开发者

VSLauncher starts wrong version

I have 3 versions of Visual Studio installed, and 3 projects that require a spec开发者_JAVA技巧ific 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.


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


The problem was that the SLN files were subtly corrupted. Deleting the files and letting the appropriate version of VS recreate them resulted in 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.


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.


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.


For Windows 10 and Visual Studios 2017 and 2019:

  1. Click Windows Start Button
  2. Start Typing 'Default app settings'
  3. Choose "Default app settings'
  4. Near the bottom of the page, click the link "Choose default apps by file type"
  5. Find the extension ".sln" or ".vcproj", and select the default application.


Open your solution in the right Visual Studio version. Click your Solution to select it. Click File --> Save xxx.sln.

VSLauncher starts wrong version

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜