Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear all
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?
Posted
Comments
Maarten Kools 2-Sep-13 7:50am    
Have you tried to repair your Visual Studio installation? It's probably just gotten corrupted.

As ^Mo^ has suggested, it it likely that you VS installation (or possibly just the registry) is corrupt, and a re-installation or a repair installation should fix it. However, it's worth trying something quick first: run VS without a project, so it comes up with a blank, new page. With any luck, it will tell you that it failed to shut down, and that it can recover. If it does it may re-establish the file associations at the same time. (You could do it manually in Windows Explorer as well)
 
Share this answer
 
Comments
ErBhati 2-Sep-13 8:05am    
Hello sir it not works for me...
No any option to recover the file .cs
 
Share this answer
 
Comments
CHill60 14-May-15 3:38am    
Please do not post questions as solutions to old posts. If you want to respond to a post use the "Have a Question or Comment?" link next to it (or the "Reply" link next to a comment)
If you want to ask a question then use the red "Ask a Question" link at the top of the page - but be sure to read the posting guidelines that will appear - your question is not well phrased and is not at all clear
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 !!

Thanks !!
 
Share this answer
 
Comments
Richard Deeming 26-Jan-15 12:48pm    
This question was posted and answered over a year ago!
NASSIM LOUCHANI 27-Jan-15 0:22am    
Thank you !?
Member 10649448 4-Jun-15 4:59am    
Thanks
Member 2971514 1-May-16 5:35am    
superb man

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900