I recently got a new laptop and did a fresh installation of Visual Studio 2013 Professional. After installation, the first thing I did was to make sure that Nuget was set to automatically download missing packages.
I'm now trying to work on the same large solution I was using before getting my new laptop, but I'm getting some strange errors that I haven't been able to resolve after many hours of research.
The most obvious symptom of the issue is that I see many errors on Razor views. They are these types of errors:
Feature 'lambda expression' cannot be used because it is not part of the ISO-2 C# language specification
Feature 'anonymous types' cannot be used because it is not part of the ISO-2 C# language specification
Feature 'implicitly typed local variable' cannot be used because it is not part of the ISO-2 C# language specification
Feature 'extension method' cannot be used because it is not part of the ISO-2 C# language specification
Another symptom is that if I try to add a new view, none of the MVC items are available: for example, no .cshtml items. However, if I create a new solution, these items are available as expected.
I updated to Visual Studio 2013 Update 3 along with the fresh installation. The solution uses MVC 4 and Razor 2. I've checked the web.config and see nothing wrong - the version of Razor and MVC I want are correct.
Despite these errors, my project builds successfully. After the build, all of the 'implicitly typed local variable' errors disappear for a few minutes, then return. Another person is working on the same solution on an old laptop and is not experiencing these issues.
I'm hoping somebody can help. I need to resolve this issue because the lack of useful Intellisense is hurting my productivity.