VSLauncher starts wrong version

2019-06-15 01:56发布

I have 3 versions of Visual Studio installed, and 3 projects that require a specific version. VSLauncher USED to look at the SLN or VCPROJ file and open the correct version of Visual Studio. Now it only starts the most recent version, regardless of the project.

Note that this has nothing to do with the commonly reported problem with beta versions of VS. none of the SLNs have ever been touched by a beta VS.

4条回答
贼婆χ
2楼-- · 2019-06-15 02:13

I had this same issue. VS 2008 solutions opening in VS2010 when double clicked. This problem went away after first going into VS 2008 and using 'Restore File Associations' then right clicking on a 2008 solution file and choosing open with and pointing it to Version Selector. Prior to this they invariably opened in 2010. Very frustrating. Hope this helps.

Tools | Options | Environment | (big button marked Restore File Associations
查看更多
贪生不怕死
3楼-- · 2019-06-15 02:19

I also found, in Windows 7 Explorer, that I could right-click the sln, select Open with / Choose default program, then select Microsoft Visual Studio Version Selector - it would open with VS2008 (as was appropriate) and from then on, double-clicking the sln file would cause VS2008 to launch.

查看更多
Juvenile、少年°
4楼-- · 2019-06-15 02:37

I had the same problem.

Visual studio could open normally the solution, but the version selector couldn't identify the version correctly.

In my case there was a problem with the EOL. Somehow the file was using unix EOL format, by changing it back to Windows format, the version selector started working again.

查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-06-15 02:38

The problem was that the SLN files where subtly corrupted. Deleting the files and letting the appropriate version of VS recreate them resulted and a file that the diff tool thought was identical, but was exactly 3 bytes longer. I suspect the problem can be traced to a missing UTF-8 Byte Order Mark. (Why VSLauncher is that picky is another question.)

ADD: Yes, After opening the new file in a hex editor, I can say for certain that the problem was a missing BOM on the old file. This was tricky to spot because my diff tool apparently does not even see the BOM

查看更多
登录 后发表回答