My PC
Windows 8 Preview Release
Visual Studio 2010 Express for Windows Phone
My App is in
Solution A
Project B
Story
The screen is freezing when I type codes
I power off the PC then restart
When I load the sln in VS2010 for wp
VS2010 said
“Solution A (0 projects)
Project B (unavailable)
The project file cannot be loaded
So I tried to “Edit B.csproj” in VS2010, it shows error
B.csproj : error : Unable to read the project file ‘B.csproj’.
B.csproj: The project file could not be loaded. Root element is missing.
Help
How can I open my solution correctly? 🙁
The easiest thing to do is probably to create a new project file. The simplest way to do this would be to:
B, with the same name.B.csprojfile to the directory where all your source forBis, overwriting the existingB.csprojfile (but take a copy of it, just incase you need it!).A.You’ll note that the project doesn’t contain any of the files / references you’d expect and will probably contain a “broken” reference to
Class1.csor any other files that were added to the new project file when Visual Studio created it. Now:Assuming there’s nothing too complicated about your project, you should only now need to re-add any References and it should compile and run. Any further things you can probably work out by using a tool like Beyond Compare to compare the new project file and the original project file to look for things you’ve missed.
Most important of all: Start using Source Control!
If you were, you’d be able to recover a previous version of your project file and not have to go through this hassle. Pretty much any source control solution you can think of can be run on a PC without requiring a dedicated server. One of the easiest to setup is VisualSVN Server, which is free for personal and commercial use.