Solved

Recover a project file

Posted on 2009-03-31
3
348 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 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

23 Experts available now in Live!

Get 1:1 Help Now