Solved

Recover a project file

Posted on 2009-03-31
3
332 Views
Last Modified: 2013-11-26
I was saving a project on Visual Studio 2008 Pro when my computer rebooted.
Now when I open a solution, I get the message "Unable to read the project file 'XXXXX.csproj'.".
I checked this file, it contains only nulled chars (instead of all the config of the project).

Is there a way to recover or regenerate this file?

Thanks for your help.
0
Comment
  • 2
3 Comments
 
LVL 9

Expert Comment

by:VikramMullick
ID: 24031014
Are you using VSS, TFS etc...?
0
 

Author Comment

by:nicolas-cableorganizer
ID: 24031170
No I'm not.

It looks like the only way to recover it is to write this file manually... that's terrible. Even Word do allow to recover files.
0
 

Accepted Solution

by:
nicolas-cableorganizer earned 0 total points
ID: 24033629
For those who would encounter the same problem, here is what I did.

1. Create a new similar project
2. Copy the content of the *.csproj (or vbproj, etc.)
3. Remove all the "Compile Include" references.
Basically this:
    <Compile Include="Form1.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Form1.Designer.cs">
      <DependentUpon>Form1.cs</DependentUpon>
    </Compile>
4. Launch your project, it should starts with none of your forms, class...
5. Add all your existing items in your project...

Hope that helps
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now