titol
titol

Reputation: 1149

Unable to open any cshtml file in any MVC project visual studio 2013

I'm start to learning MVC and got problem at the beginning :) I cant open or add any View. If i try to open any cshtml file, it shows me error:

The document cannot be opened. It has been renamed, deleted or moved

Ofcourse document appear in folder. I tried to open cshtml in newly created project and from templates downloaded from microsoft sites. Both gives me the same error. I have done some web research, but any of those solution does not work for me. I tried to modify web.config files, but nothing happend. I've got the same error over and over again. For now I'am downloading vs2013.4 to reinstall my environment, but i'am realy curious what making error here. Have you got any solutions?

Upvotes: 1

Views: 4344

Answers (2)

beforan
beforan

Reputation: 91

Head to your project's properties, and choose "Web" from the left hand side.

Underneath "Servers", if you're using IIS Express (usually default), you'll have a button that reads "Create Virtual Directory".

Click that and then you should be able to open your views.

Upvotes: 9

Midhun Mundayadan
Midhun Mundayadan

Reputation: 3182

closing VS and then deleting the solution's .suo file. then restart VS by double-clicking the .sln file i think this will work for you.

The project file * has been moved, renamed or is not on your computer

Upvotes: 3

Related Questions