“没有可用的编辑器"无法打开 .cs [英] “There is no editor available for” Can't open .cs

查看:148
本文介绍了“没有可用的编辑器"无法打开 .cs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的计算机在处理项目时关闭,当我再次打开 C# 并恢复它时,我收到错误消息没有可用于 filename.cs 的编辑器确保文件类型 (.cs) 的应用程序是安装",现在我根本无法访问我的代码.我正在使用 Visual C# 2010 express.我尝试直接打开它并打开 C#,但 .cs 文件在记事本中打开.文件大小为 30kb,所以它没有被删除.并且在上次运行的调试文件夹中仍然有一个可用的 .exe.有没有办法恢复代码?

My computer shut down while working on a project and when I opened C# again and recovered it, I got an error saying "There is no editor available for filename.cs Make sure the application for the file type (.cs) is installed" And now I can't access my code at all. I'm using Visual C# 2010 express. I tried opening it directly and it brings up C# but the .cs file opens up in notepad. The file size is 30kb so it didn't get deleted. And there is still a working .exe in the debug folder of the last run. Is there any way to recover the code?

推荐答案

要解决您需要的问题:

To fix the problem you need:

NotePad++ 你应该遵循以下简单的步骤:

NotePad++ And you should follow this simple steps:

关闭 Visual Studio.

Close Visual Studio.

转到您的 VS 版本的备份文件夹,通常位于:C:\Users(your用户名)\Documents\Visual Studio(年份)\Backup Files\您的项目或应用名称".

Go to the Backup Folder of your VS version usually in: "C:\Users(your user name)\Documents\Visual Studio (year)\Backup Files\your project or application name".

打开损坏文件的最后一个备份文件,通常是名称格式为:Recovered-month.-day-year-time.(Your File Name).cs"NotePad++,并复制源代码.

Open the last Backup file of your corrupted file, usually the name format is : "Recovered-month.-day-year-time.(Your File Name).cs" with NotePad++, and copy the source code.

转到项目文件夹中损坏的文件并使用以下命令打开它NotePad++,编辑 => 全选 => 粘贴源代码并保存.

Go to your corrupted file in the project folder and open it with NotePad++, Edit => Select All => Past the source code and Save.

转到 windows 开始列表并搜索:Visual Studio Tools"文件夹,打开它并双击:VS(year) 的开发人员命令提示符".

Go to windows start list and search for: "Visual Studio Tools" folder, open it and double click on: "Developer Command Prompt for VS(year)".

在开发者命令提示符中写下这两个代码:devenv.exe/setup" 然后是 "devenv/resetskippkgs" .

Write this two codes in the Developer Command Prompt: "devenv.exe /setup" and then "devenv /resetskippkgs" .

打开您的项目.

注意:如果这对您不起作用,请尝试执行此之前的步骤安排:

Note: if this didn't work for you try to do the steps before in this arrangement:

1) => 2) => 3) => 4) => 7) => 1) => 5) => 6) => 7)

1) => 2) => 3) => 4) => 7) => 1) => 5) => 6) => 7)

您的问题将得到解决.

它对我来说 100% 有效,我希望这会帮助你!

It works 100% for me, i hope this will helps you!

来源:没有可用的编辑器"无法打开 .cs

这篇关于“没有可用的编辑器"无法打开 .cs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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