打开.cshtml文件时出现问题 [英] Problem opening .cshtml files

查看:353
本文介绍了打开.cshtml文件时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


所以过去几天我一直在学习ASP.NET核心MVC。前几个项目就像预期的那样工作,没什么特别的。昨天,我开始了一个新项目,仍然遵循教程所说的一切,但我无法打开任何.cshtml文件。我在不同情况下测试了
它,但即使它是一个没有修改过的全新项目,我也无法打开它们,现在即使在之前几天工作正常的项目中也无法打开它们。


所以我不知道昨天会发生什么导致Visual Studio变得愚蠢。


当我尝试打开一个时出现的错误是这个:"文件无法打开。它已被重命名,删除或移动"。


现在我可以向你保证,这一切都不是真的。其他所有程序,如Sublime或Webmatrix,都可以毫无问题地打开文件。


昨天,在Visual Studio中没有任何工作,每个项目都有编译错误。


所以任何帮助都表示赞赏。有什么建议吗?


提前谢谢

解决方案

您好Spartai,


欢迎来到MSDN论坛。


Visual Studio的版本是什么? Visual Studio 2015更新3对我的工作正常。由于我们无法确定这个问题的原因,我想给你一些解决方法来解决这个问题:


1。以管理员身份运行visual studio。


2。检查您是否安装了任何其他扩展,例如Xamarin。请打开一个管理CMD窗口并导航到C:\Program Files(x86)\ Microsoft Visual Studio \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ b看起来这个问题是由扩展引起的,你需要停用该扩展名。


3。如果此问题仍然存在,请尝试修复或重新安装Visual Studio,检查它是否正常。



希望这可以帮助您 


Hello,

So the past few days I've been learning ASP.NET core MVC. The first few projects worked just like expected, nothing special. Yesterday, I started a new project, still following everything the tutorial said, but I couldn't open any .cshtml files. I tested it in different situations, but I can't open them even if it's a completely new project with nothing modified, and now I can't open them even in previous projects that were working fine a few days ago.

So I have no idea what could have happened yesterday that made Visual Studio go stupid.

The error it says when I try to open one is this: "The document cannot be opened. It has been renamed, deleted or moved".

Now I can assure you, none of that is true. Every other program, like Sublime or Webmatrix, can open the files without any problems.

Yesterday, nothing worked in Visual Studio, every project had a compile error.

So any help is appreciated. Any suggestions?

Thank you in advance

解决方案

Hi Spartai,

Welcome to MSDN forum.

What is the version of your Visual Studio? It`s works fine for me with Visual Studio 2015 update 3. Since we could not sure the reason for this issue, I would like give you some troubleshootings to resolve this issue:

1. Running visual studio as a administrator.

2. Check if you have install any other extension, for example, Xamarin. Please open an administrative CMD window and navigate to C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE and run the command: devenv /safemode, if it works and it looks like this issue caused by the extensions, you need to deactivated that extension.

3. If this issue still persist, please try to repair or reinstall your Visual Studio, check if it works fine.

Hope this can help you. 


这篇关于打开.cshtml文件时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆