How does “Visual Studio Version Selector” find the path to the appropriate Visual Studio executable?

Viewed 189

This is not the same question as How exactly does “Visual Studio Version Selector” chooses a VS version?. That question was about how the Visual Studio Version Selector worked out which version to use, based on the contents of the solution file.

This question is a follow-on: Having determined which version of Visual Studio to use, how does the Visual Studio Version Selector know where to find the appropriate Visual Studio executable to run? Are the paths to each Visual Studio executable somehow registered with the Visual Studio Version Selector (eg in the Registry somewhere)?

The reason I ask is that I'm interested in using Vagrant to install Visual Studio and other development tools, such as SQL Server Management Studio, onto new developers machines so they don't have to manually install each tool, one by one. But I don't know how to tell the Visual Studio Version Selector where to find the newly installed Visual Studio executables.

I could just get Vagrant to run the installer for Visual Studio but this would be very slow. So I would prefer to have Visual Studio pre-installed in the Vagrant box. In that case, however, I would need to somehow tell the Visual Studio Version Selector the path to the Visual Studio executable.

By the way, this won't just apply to the latest version of Visual Studio. We have different projects using every version of Visual Studio between 2005 and 2019. So I would like to create several Vagrant boxes for the different versions of Visual Studio, so if a developer is doing maintenance on an older project they could just use the appropriate Vagrant box to install the appropriate version of Visual Studio. And have the Visual Studio Version Selector work with whatever versions of Visual Studio are installed.

0 Answers
Related