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

后端 未结 11 1768
感情败类
感情败类 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:29

    I had the same problem with a .cs file in Visual Studio 2017 after a crash. My solution was as follow:
    Go to the corrupted file in Explorer. In my case the corrupted Form1.cs contained only NULL values due to the crash (you can test this by opening in Notepad++ for example). Just backup or delete this file. In my case there was also a backup file in the same folder named like Form1.cs~string.TMP. Rename this to Form1.cs and reopen your project and double click on the Form1.cs and it will open successfully.

提交回复
热议问题