2

The Razor intellisense stopped working in one MVC 4 project, and one project only on my pc. I use Visual Studio 2013 Professional. I know this is an issue that has happened to a lot of people before me. I've tried many possible solutions, but the one that works for me has not been there yet...

A list of what I tried so far:

  • Delete the temporary .suo file
  • In tools->options check Auto list members
  • Remove the project from the solution and add it back
  • Create a new Visual Studio MVC project and copy the web.config file
  • Delete old Visual Studio 2010 settings in AppData/Roaming/Windows/Visual Studio
  • Change MVC version in web.config file in Views folder
  • Clean the solution, exit VS, reopen it and rebuild entire solution
  • Unload and reload the project within the solution

and probably I tried more which I can't remember right now. Does anyone have another solution/tip to solve this?

Suggested answers for this post which didn't work either:

  • Repair Visual Studio and reinstall ASP .NET MVC
FJPoort
  • 225
  • 2
  • 7
  • 16

1 Answers1

0

I've faced same kind of problem with different causes and solved as follow:

  1. web.config in all views folders: I got a correct version of web.config creating a new Area in my project and using it in other view folders
  2. Feature … cannot be used because it is not part of the ISO-2 C# language specification generally these kind of errors does not block compilation, but could be very annoying. To solve this error I've added this segment in web.config (or in app.config if your project is not a web project)

    <system.web> <compilation debug="true" targetFramework="4.0"> <assemblies> <!-- ASP.NET 4.0 Assemblies --> <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </assemblies> </compilation> </system.web>

  3. local assemblies: sometimes, when I've used external assemblies (for helpers e.g.) I've had to check for Copy Local = true in Project references.

In all cases It could be needed to close/reopen VS to get the modification applied. hope it helps

wilver
  • 2,106
  • 1
  • 19
  • 26
  • Thank you for the suggestions. 1) I do only have one web.config in my view folders, which I already had replaced with a new, clean version. 2) is not the case in my project. 3) The assemblies were already set to Copy Local. – FJPoort Feb 17 '15 at 07:40