These elements tell MSBuild where to place files once they’ve been compiled.
(hopefully not in the future) “Enabling MVC5 intellisense in a Class Library Project.” Thetoeb, 5 January 2014. In any event, all of the discussion related to the problem that I found online pointed to, essentially, the same answer. Not content with what I found online I tried a few approaches of my own.
The only way to get the Intellisense support back is set the output path back to the bin directory. First, I tried adding MSBuild .targets files to the solution where the solution would compile its output to the staging folder as intended and then copy the output back to the bin directory. Next I tried updating the .targets such that, instead of physically copying files, they created symbolic links where the bin\Debug folder linked to the compiled output in the staging directory. If I changed the Output Path back to the bin directory and compiled the solution then everything worked as expected.
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.
This opens the file in the editor and you should see that there’s support for syntax highlighting and Intellisense.
Now the solution is set up and it’s been verified that everything is working as expected.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.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.Right-click the project in the Solution Explorer and select Reload Project.