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

Thanks but I couldn't find what i am looking for on that link
–
Hakan KaraOct 11 '12 at 13:11

1

It answers both your questions. The icon is determined by an icon handler shell extension and (as explained in the answers below) the VS version to open is determined by the Version Selector.
–
StijnOct 11 '12 at 13:44

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.