I am using Visual Studio 2015 Update 2 and have two ASP.NET 4.6 projects which are very similar. Both use MVC 5.2.3 and Razor 3.2.3 (I'm unsure what details are necessary so will keep it brief).
I can run one and it works normally as expected, but as soon as I run the second one concurrently the second project fails in the view as @Html is null, similar to what happens if you don't reference Razor correctly.
It seems there is some sort of conflict between the two projects. (I have checked that both instances are running on different ports.) However, even when I stop the first project, the second one still fails in the view's Html object.
This persists until I log off and back on again. On further investigation I found that the process VsHub still has a child Microsoft.VsHub.Server.HttpHost process running with the details to the first project on it, even after I close VS. If I kill this process, the second project can run without error. I am not sure if this is directly related to my issue, however.
Has anyone had anything similar to this, or an idea of what I have done wrongly to cause this to happen?
Right click on your solution and select Properties. In the "Startup Project" select "Multiple startup projects" and set "Action" of your projects to "Start"