How exactly does “Visual Studio Version Selector” chooses a Visual Studio version?

前端 未结 3 1120
忘掉有多难
忘掉有多难 2020-12-09 03:18

For extensions like .sln or .csproj, the default application is Microsoft Visual Studio Version Selector. I\'ve got two versions installed

3条回答
  •  遥遥无期
    2020-12-09 04:01

    There are some version info in the file header. Otherwise it would not be possible for the file explorer to display different document icon on the .sln file with a number:

    VS2008 VS2010 VS2012 VS2013 VS2015 VS2017 VS2019 representing .sln files for VS versions 2008/2010/2012/2013/2015/2017/2019

    This number on the icon disappears if you edit the .sln file with notepad or some other text editor that does not preserve the UTF-8 signature (see comment by Paul Groke). In this case also the version selector cannot choose the right version, and you cannot open it from the file explorer. You can specifically open it from within Visual Studio and save the .sln file to fix it. Also see this for more on this issue.

提交回复
热议问题