Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisualD installer doesn't detect Visual Studio 2022 installation when it has a nickname #271

Open
gmueckl opened this issue Mar 13, 2024 · 1 comment

Comments

@gmueckl
Copy link

gmueckl commented Mar 13, 2024

Recent versions of Visual Studio allow multiple parallel installations for the same version (for example, 2022 Pro and 2022 Enterprise can be installed at the same time, see [1]). The installer prompts the user for a nickname for any additional installation, which cannot be changed later [2]. This nickname gets appended in paranthesis to the DisplayName key in the corresponding uninstaller registry key. For example, I have an installation named "Microsoft Visual Studio Enterprise 2022 (2)" because it was a secondary installation at some point in the past. At least VS2022 and VS2019 support this feature. I don't know if support goes back further.

The VisualD installer script looks for Visual Studio 2022 comparing the last 4 characters of the display name with "2022". This fails with a nickname present and the Visual Studio 2022 checkbox gets disabled. I think a better algorithm is to ignore anything after the first " (" in the display name. Of course, this has the unpleasant side effect that the user would ultimately need to get a choice of installing VisualD for each parallel Visual Studio installations if this side-by-side installation situation is to be supported properly.

Unfortunatenly, my NSIS scripting skills are not good enough to fix this issue myself. Otherwise, I'd be working on a patch already :(.

[1] https://learn.microsoft.com/en-us/visualstudio/install/install-visual-studio-versions-side-by-side?view=vs-2022#install-different-editions-of-the-same-major-visual-studio-version-side-by-side
[2] https://developercommunity.visualstudio.com/t/rename-microsoft-visual-studio-2-to-microsoft-visu/1016860

@rainers
Copy link
Member

rainers commented Mar 14, 2024

I guess vswhere (https://github.com/microsoft/vswhere) can detect all installations, so it would not be too hard to get a list of them all. Making NSIS show and execute this list dynamically is probably a nightmare, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants