Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Opening existing project in Visual Studio 2010

All,

I have a project that was originally written in vs 2005 or earlier (don't remember bc I didn't write it). I opened it in vs2008 and converted it although it still has the csproj file. sln file states:

Microsoft Visual Studio Solution File, Format Version 10.00

Visual Studio 2008

Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "foo", "foo.csproj", "{BF9BAC88-C507-404D-928C-BC08193F5CCD}" EndProject

I have worked with the project many times in vs2008 without any problem.

Now I am running vs2010 on a virtual machine and want to open this project in it. However, when I try I get the "cannot be opened because its project type .csproj is not supported by this version of the application" error. Main solution files are foo.sln, foo.csproj, and foo.csproj.user (in addition to code files). I am somewhat confused as I thought using it in vs2008 (and going through the initial conversion) would make the jump to vs2010 painless.

What am I missing? All my searches end up with the same few posts about converting projects in 2008.

Thanks!

like image 647
user419585 Avatar asked Aug 13 '10 13:08

user419585


People also ask

How do I open old Visual Studio projects?

You might be able to find your old projects in a "Recent Projects" list, but if you don't see it there, you can browse to it with File Explorer. To open an old project from File Explorer, make sure you chose one of the the VC++ Project ( . vcxproj ) or Microsoft Visual Studio Solution ( . sln ) type files.

How do I open an existing Visual Studio code?

Open any code. You can open code into Visual Studio in the following ways: On the Visual Studio menu bar, choose File > Open > Folder, and then browse to the code location. On the context (right-click) menu of a folder containing code, choose the Open in Visual Studio command.


2 Answers

This is a bug in Visual Studio 2010. I pointed it out to Microsoft when testing VS2010Beta and they first said they couldn't repeat it and then when I told them how easy it is to repeat they said that it isn't important.

It is easy to get around it. Open VS2010 first, browse to the project, open it. VS2010 then does the usual asking if you want to convert it and say yes and it succeeds.


Archives downloaded from the internet may have to be "Unblocked" first. VS2010 continued to have this problem with a source tree until I "Unblocked" the originating archive and re-extracted its contents into a recreated directory.

like image 150
Splodgi Avatar answered Oct 25 '22 03:10

Splodgi


Open up Visual Studio and check that your installation genuinely contains the C# components. I believe you'd see this error if you had (say) Visual Basic Express installed, but not Visual C# Express.

like image 34
Jon Skeet Avatar answered Oct 25 '22 01:10

Jon Skeet