Solved

Recover a project file

Posted on 2009-03-31
3
371 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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