Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After installing AspNet5RC1, can no longer open cshtml files in any previous / new MVC project

After installing AspNet5.ENU.RC1 any previous or new MVC project throws a

The operation could not be completed. Invalid pointer

error when opening razor pages (.cshtml). Other files such as class libraries and config files open as expected. Any suggestions before I reinstall VS?

like image 727
MykeDu Avatar asked Nov 21 '15 07:11

MykeDu


People also ask

How do I view Cshtml?

Right click the Index. cshtml file and select View in Browser. You can also right click the Index. cshtml file and select View in Page Inspector.

Which directive helps Cshtml?

cshtml file, you will still need to use @using . The @namespace directive was designed so the C# classes added to a project and pages-generated code just work without having to add an @using directive for the code behind file.


1 Answers

As @chsword commented above:

  1. Open the folder: Users\(user)\AppData\Local\Microsoft\VisualStudio (version)

  2. Delete the folder: ComponentModelCache

  3. Restart Visual Studio (ComponentModelCache is re-created and the problem goes away)

like image 140
CMS Avatar answered Oct 10 '22 13:10

CMS