Think that I have two solutions: vs2009.sln and vs2010.sln. Both of solution files have the same extension (.sln) but they have different icons. And they are opened in the related version of visual studio. I wonder how does visual studio determine this?
Edit: Visual studio version selecter is ok but i wonder how can the icon be different even the extensions are same? I used to know that every extension has only one icon in registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Current Version\explorer\Shell Icons
2.Edit: I found the answer finally. If anyone wonders about that, the answer is here http://msdn.microsoft.com/en-us/library/cc144122%28VS.85%29.aspx
Solution files are text files.
The very first line contains version information.
For example, for a Visual Studio 2010 solution you will find:
Additionally, when you have several different versions of Visual Studio installed, the
.sln
file goes through the Visual Studio Version Selector utility that reads this and opens the corresponding version of Visual Studio. Check the.sln
file associations.Try opening the .sln in a notepad
the first line itself says
Microsoft Visual Studio Solution File, Format Version 10.00
or 11 or whatever version it isOpen your .sln file with Notepad or another text editor. Look for
Format Version
on the first line which correlates with a Visual Studio version. Here's some that I'm familiar with: