My Razor views in VS2015 RC are not showing the proper coloring for C# code. My project was working fine in VS2013, but it isn't in 2015, and it's not giving me any Intellisense on the C# code. The solution builds and the site runs fine.
I tried the following to no avail
- disabling all Visual Studio extensions
- deleting my
.suo
file - removing the project and re-adding it to the solution
How can I fix this?
Example:
I had a similar issue, where any razor script wouldn't be highlighted, intellisense wouldn't work and the compiler wouldn't recognise any errors (even where I intentionally put syntax errors in!)
I actually fixed the problem by going to C:/Users/YourUserName/AppData/Local/Temp and deleting everything out of this file, soon as I did that and restarted VS my Razor Views started to work!
Hope that helps!
This will be the effect if your project is MVC4. See more details here. Also note that this will be corrected in an upcoming release.
How can you tell if your project is MVC4? Open packages.config and scroll to the entry for Microsoft.AspNet.Mvc. If the version listed starts with "4", this means you are using MVC 4.
Some views were working fine for me, some not at all... The only thing that helped for me:
I tried most of the other solutions, too, but they didn't work for me.