All Categories

  • Use Team Foundation Version Control(TFVC) at Visual Studio Code

    7/6/2017 -
    Install Visual Studio Team Services Extensions from Visual Studio Code Marketplace. Add TF Command line to Visual Studio Code  VSC - File - Preferences - Settings Depend on what's Visual Studio you installed on the machine, visual studio code's TFVC location will be different, following is an example for vs2015 and vs2017 for your reference. // example tf.exe location for visual studio 2015 { "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\tf.exe", "tfvc.restrictWorkspace": true } // example tf.exe location for visual studio 2017 { "tfvc.location": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\IDE\\CommonExtensions\\Microsoft\\TeamFoundation\\Team Explorer\\tf.exe", "tfvc.
    Visual Studio Code
  • Web Caching - Sample Code in ASP.NET MVC

    7/1/2017 -
    ASP.NET MVC's OutputCache 1. Permanently store cache on client and server Following example code, permanently cache page on client and server means once browser loads the page the page will remain on the page forever unless server rebuild, since cache on the server another agent will use the same server cache version as well. This is good for static resource and the resource won't change until server rebuild. [OutputCache(Duration =int.MaxValue)] public ActionResult Index() { return View(); } max-age The code above will response as following, the key here is max-age (in seconds). As you can see it means the page will keep a cache for a year. This Client Cache will not work if either user type,F5 or open developer console and check the.disable cache Otherwise, the browser will use the cached version from a client machine.
    ASP.NET MVC
  • Git with Visual Studio

    7/1/2017 -
    Common Issue with Git Visual Studio Merge or Commit error If you're using Visual Studio Git.Merge code from source branch to target branch and there's new commit at target branch, you might see following error. An error occurred. Detailed message: 2 uncommitted changes would be overwritten by merge You'll probably still see this error after try couple time pull operation from target branch. I think this might be a bug for using Visual Studio git, but some people saying it might be file be locked, anyway it is something should working but git VS is not doing correctly. So following are the fix I have tried and works so far. After check out to target branch always pull first then do other operation like merge or push.