June 22
Today just moved from a working ldc2 1.8.0 to 1.9.0 by simply changing my PATH. After that a freshly made default hello world vibe.d application does not build.

A simple hello.d builds and runs fine using ldc2 1.9.0 directly i.e. without dub.

dub init hello --type=vibe.d
cd hello
dub --force

The above builds all vibe.d libraries fine, then when building the application I get:

Warning: no Visual C++ installation detected
C:\Users\carl\ldc2-1.9.0-windows-x64\bin\ldc2.exe failed with exit code 1.

and then no further information.

The selfsame warning also occurred when building with ldc2 1.8.0 (and 1.4.0 prior to that, all on the same machine) but the failure does not occur and the resulting application runs fine.

Also, when building a simple hello.d without dub, which works fine, there is no warning "no Visual C++ installation detected". This warning only appears with dub and not with direct use of the compiler with all choices of ldc2: 1.4.0, 1.8.0, 1.9.0.

ldc2 1.10.0 behaves the same as 1.9.0 in the above situations.

I am using the stand-alone Visual C++ Build Tools as described here:
https://github.com/ldc-developers/ldc#windows
and this has worked fine for me with ldc2 until now. I simply ran the installer for those long ago, and did nothing further.

Any suggestions?


June 22
On Friday, 22 June 2018 at 21:22:20 UTC, Carl Sturtivant wrote:
> Today just moved from a working ldc2 1.8.0 to 1.9.0 by simply changing my PATH. After that a freshly made default hello world vibe.d application does not build.
>
> A simple hello.d builds and runs fine using ldc2 1.9.0 directly i.e. without dub.
>
> dub init hello --type=vibe.d
> cd hello
> dub --force
>
> The above builds all vibe.d libraries fine, then when building the application I get:
>
> Warning: no Visual C++ installation detected
> C:\Users\carl\ldc2-1.9.0-windows-x64\bin\ldc2.exe failed with exit code 1.
>
> and then no further information.
>
> The selfsame warning also occurred when building with ldc2 1.8.0 (and 1.4.0 prior to that, all on the same machine) but the failure does not occur and the resulting application runs fine.
>
> Also, when building a simple hello.d without dub, which works fine, there is no warning "no Visual C++ installation detected". This warning only appears with dub and not with direct use of the compiler with all choices of ldc2: 1.4.0, 1.8.0, 1.9.0.
>
> ldc2 1.10.0 behaves the same as 1.9.0 in the above situations.
>
> I am using the stand-alone Visual C++ Build Tools as described here:
> https://github.com/ldc-developers/ldc#windows
> and this has worked fine for me with ldc2 until now. I simply ran the installer for those long ago, and did nothing further.
>
> Any suggestions?

I just tried this in a 'x64 Native tools command prompt for VS 2017' (environment variables fully set up by MSVC, no VS detection by LDC) and a naked cmd.exe (my system PATH and other env variables are pretty clean, no LDC/VS traces in there) with LDC 1.10 and its included dub (v1.8.1) on Win10, no warnings, no issues.

It smells very much like a dub issue if you experience it with dub only (and may have something to do with your particular environment); there have been no recent changes to LDC regarding VS detection & environment setup either.
You could give an older dub version a try; e.g., 1.8 ships with dub v1.7.2 (copying dub.exe to the new dir should do it). But it's also very strange that earlier dub/LDC combos worked despite the 'no Visual C++ installation detected' warning, that is supposed to be pretty fatal for linking. You can check out/hack the `bin\msvcEnv.bat` file to troubleshoot the MSVC detection.