Visual studio razors do not recognize the model

I have 2 instances of VisualStudio 2010 open, and both projects are ASP.Net MVC, and I use the Razor viewer. In the first case, the views recognize the @model value, and I get intellisense. The second instance does not recognize the model for presentation and not intellisense. I know that I have the correct namespace for the model, because I can run the application and get the results. What setting am I missing? Thank.

+2
source share
2 answers

Most likely the problem is with the MVC version and dll configuration to use.

Be sure to identify all valid MVC DLL versions in the configuration files.

I had the same problem in Visual Studio 2013, the project was updated from MVC 3 to MVC 4, make sure that each config refers to the correct dll versions, and the problem persists.

0
source

I just fought this with VS2013 today; the .csproj file installed all the links to Private (= True) and got confused this way. Removing all private tokens (and setting SpecificVersion = False) was again conceived by Visual Studio.

Links are displayed again as Private = True, but Razor's syntax hasn't broken yet (yet).

0
source

All Articles