mvc项目html文件,无法在任何MVC项目Visual Studio 2013中打开任何CSHTML文件

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?

Talk1:

have you tried restarting your machine ;)

Solutions1

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.

Talk1:

As i said in upper answer comments, i reinstal visual studio to update4.

Talk2:

I likewise installed update 4 - no joy. Then I did as suggested above and it works. But why? What does having a virtual directory in the project properties have to do with Visual Studio 2013's ability to edit a .cshtml file? Weird!

Solutions2

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.

Talk1:

I tried this with no success. Also it shouldn't appear with every new project. For now i reinstall visual studio to update4 and it's working fine.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值