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
To fix the problem you need:
And you should follow this simple steps:
Close Visual Studio.
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".
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.
Go to your corrupted file in the project folder and open it with NotePad++, Edit => Select All => Past the source code and Save.
Go to windows start list and search for: "Visual Studio Tools" folder, open it and double click on: "Developer Command Prompt for VS(year)".
Write this two codes in the Developer Command Prompt: "devenv.exe /setup" and then "devenv /resetskippkgs" .
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!
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. =)
In my case the reason was a wrong unprintable character like '' in code comments. Removing it completely solved problem.
Try to restore it from early date - it worked for me :)
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.
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.