views:

127

answers:

4

I have an old VS2008 solution that had one project in it.

When I double-click on the .sln file it says that nothing can be found (I had renamed some directories).

So now what is the best way to take my main files (Window1.xaml, App.xaml, Properties folder, and about 10 other class files) and recreate a solution and project for these main files again?

ANSWER:

Thanks Gerrie, you were right, manually was the only way:

  • created new WPF solution
  • recreated all folders
  • right-clicked project, add existing items, changed to *.*, added all at once
  • for each folder, add files as in above step

So in my case I was done in 5 minutes, but for larger solutions, one would hope there is an open-source tool or VS2008/VS2010 feature for this.

+1  A: 

Why not just open the .sln file in notepad and fix the paths to the project?

HTH, Kent

Kent Boogaart
thanks, tried that, but the .csproj file is also missing
Edward Tanguay
A: 

create new solution, new project, new classes, and copy & paste the content. 10 classes is not a hell of a job to do manually.

or

revert your changes in TFS

Natrium
+1  A: 

Try File -> New Project -> Project from existing code

Or simply, create a new project having name of your choice in the same folder and then add the existing items into that project!

Khurram Aziz
tried it, strangely no choice for WPF project only Console, Forms and Class Library.
Edward Tanguay
Create a new WPF project; remove the default control/class etc and then add your existing files
Khurram Aziz
+2  A: 

Create a new solution and add everything.

In short: do it manually.

Gerrie Schenck