Reputation: 1787
I have a solution which was build using Visual Studio 2008.
I have visual studio 2008 and 2010 both installed.
When i double click to the *.sln file it always open with Visual Studio 2010.
here is some part of my *.sln file:
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HB", "HB\HB.vcproj", "{B5EE6D21-031F-44D3-993E-6580172AA5E0}"
EndProject
Can anyone tell me what is going on and what should i do to fix the issue?
Upvotes: 1
Views: 1492
Reputation: 31
When you view the icon in Windows explorer, does the icon match the Visual Studio version you want it to open with? If not, your sln file may be missing a UTF-8 signature. To fix this:
The icon should change to match the desired Visual Studio version and double click should open the correct version.
Upvotes: 0
Reputation: 10582
I had a similar issue happen to me and it was because my sln
file was saved in UTF-8
encoding. After saving it in ANSI
, double-clicking on it would open in the correct version of Visual Studio again. It may (also) have had something to do with the byte order mark (BOM) that causes the Microsoft Visual Studio Version Selector to parse the file incorrectly depending on the file encoding.
Upvotes: 0
Reputation: 54505
The beginning of the quoted solution indicates that it was not already opened with VS 2010 (and converted, as discussed in Working with Visual studio 2010 and 2008). The versions are discussed in How can I tell what version of Visual Studio was last used to work on a project?. According to Getting Visual Studio version of a Solution file, version 10 corresponds to VS 2008.
Starting with a VS 2008 solution file:
Double-clicking gives the default action. Right-click to get the version-selector as hinted in How to force a Solution file (SLN) to be opened in Visual Studio 2013?.
If you have problems getting the solution-chooser, this is discussed in Visual Studio Version Selector Doesn't open.
You can have multiple versions of Visual Studio installed, as discussed in Will installing Visual Studio 2010 side by side with VS2008 cause problems?. One caveat is that you should install them in their order of release (as noted in MSDN).
Upvotes: 2