Fix – The Selected file cannot be opened as a solution or project – Visual Studio Work Around

Posted by admin on Oct 4, 2010 in code, tips, VSTS |
Visual Studio 2005

Visual Studio 2005

Yesterday I brought into work an application that I had developed at home. The application was written in VB.Net using Visual Studio 2008.

My work Development environment is Visual Studio 2005 and I needed to update the source code so I tried to load up the solution file and I received the error “The Selected file cannot be opened as a solution or project. Please select a solution file or project file “.

I know from past experience that .sln (solution) files are just text files with references to other code and the development environment.

So if you ever receive the above message and your moving code from Visual Studio 2008 to 2005 then load the sln file in a decent text editor (Notepad ++ will do)

change the top to lines from

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

to read

Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005

save the solution file and now open it in your 2005 development environment.

You may have to refactor some code if you have used new objects or syntax which are new to 2008.

However you should be able to to just code as normal.

Reply

Copyright © 2012 The Test Manager Blog All rights reserved. Theme by Laptop Geek.