Visual Studio won't open solution file

109221793 picture 109221793 · Sep 21, 2010 · Viewed 70.7k times · Source

I have a VS project (made by someone else), and when I try to open it on Visual Studio 2008, I get the following error message:

"The selected file is a solution file, but was created by a newer version of this application and cannot be opened"

I would have thought VS was backwards compatible. Is there any way I can open this?

Answer

CyberDude picture CyberDude · Sep 21, 2010

You can edit the sln and csproj/vbproj files by hand and try that way, I've used this method with no side effects. In the sln file the first lines for VS2010 will say

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010

and for a VS2008 solution:

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008

Also, in a 2010 project file you may find a section like

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

which will need to be modified as

<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v9.0\WebApplications\Microsoft.WebApplication.targets" />

With only these 2 types of changes I was able to open the solution & projects with VS 2008. Of course other differences may appear but if you have time you can always use a try/fail method until you manage it.