“There is no editor available for” Can't open .cs

后端 未结 11 1687
感情败类
感情败类 2020-12-18 23:35

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

相关标签:
11条回答
  • 2020-12-19 00:04

    To fix the problem you need:

    1. NotePad++

    And you should follow this simple steps:

    1. Close Visual Studio.

    2. 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".

    3. 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.

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

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

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

    7. Open your project.

    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)

    and your problem will be fixed.

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

    0 讨论(0)
  • 2020-12-19 00:06

    C# has a "backup" folder which I wasn't aware of, but I found a backup version inside it which made me only lose a few minutes of work. =)

    0 讨论(0)
  • 2020-12-19 00:09

    In my case the reason was a wrong unprintable character like '' in code comments. Removing it completely solved problem.

    0 讨论(0)
  • 2020-12-19 00:10

    Try to restore it from early date - it worked for me :)

    0 讨论(0)
  • 2020-12-19 00:12

    I had the exact same problem happen and was able to fix it:

    My issue was due to incorrect line endings / a null terminator was accidently introduced when I did a find / replace using Visual Studio. This threw the whole thing out of whack. My assumption would be because the Null terminator is used to signify the end of the document and I had accidently introduced it in the middle of the document (which also led to bizarre compile errors).

    A simply find / replace through another editor (Notepad++) allowed me to find the incorrectly placed null terminator and remove it.

    0 讨论(0)
  • 2020-12-19 00:15

    Try to open the .cs file in notepad. Then copy the code and open a new codefile and copy the code in there. That should help.

    0 讨论(0)
提交回复
热议问题