DMD Windows installer doesn't detect recent release of VisualStudio
I just ran the DMD installer, and it complained that no VS installation (either the main IDE, or the tools distribution) was installed, so it couldn't find the libs and linker. I have the latest version of VS installed.
moved to dlang/installer.
Presumably https://github.com/dlang/installer/blob/master/windows/d2-installer.nsi is the file that the installer is created from. What is the exact version of VS you have installed? What is the exact error message you receive trying to install it (for grepping the above linked file)?
The operational binaries seem to be hiding generally under C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\...
Thanks, offending code seems to be at https://github.com/dlang/installer/blob/master/windows/d2-installer.nsi#L384 (and also a suggestion to download version of VS2022 https://github.com/dlang/installer/blob/master/windows/d2-installer.nsi#L341). I don't speak NSIS, but I don't think that should be too hard to fix, but I don't have a windows box.
More than happy to merge a fix though.
Rikki linked me to https://github.com/microsoft/vswhere which we should probably be using instead of all this.
After playing a bit and reading the wiki, it should be a case of running the following command:
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
If its non-empty, you have a > 2017 VS install. If not you do not.
If program not found, no install.
ping @rainers could you take a look at this?
Just to mention that Visual D can detect VS2022 (while the D compiler installer can't):