Updating intelisense

Posted by / 04-Jan-2018 10:01

Updating intelisense

The problem seems to be specifically related to the Razor view engine and Intellisense based on where the output files are kept.After researching the problem on the Internet I was unable to come up with a clear explanation for why.To verify that Intellisense support has truly been lost close the view and then close and re-open Visual Studio.Re-opening the view will show the same result – no Intellisense.For the purposes of this exercise, we’re most interested in the property groups that set properties based on the configuration and platform values.In particular, we’re looking at the Output Path element.This reloads the project and allows you to navigate its contents.

Finally, an implementation is demonstrated that restores Intellisense whilst still allowing files to be staged in an external folder by setting the Output Path to the project bin folder and using custom build targets to copy the compiled output to the staging folder. We’ll create a new, blank solution and then add a new ASP. At this point we’ve created the solution, added the ASP.Interestingly, the break only seems to affect .cshtml files.If you inspect the files you should find that syntax highlighting and Intellisense work as expected. So the solution still builds and executes as expected.An unusual quirk of the new Razor view engine in MVC 5 with Visual Studio 2013 seems to be that if you set the solution output path to anything other than the default project’s bin folder you’ll lose syntax highlighting and Intellisense support in the application views.After some research and exploring on my own I’ve found an approach that restores Intellisense and still allows for sending compiled output to a folder other than the project bin.

updating intelisense-50updating intelisense-29updating intelisense-19

This article starts with creating a basic MVC 5 ASP.