Start QtCreator 4.2, open a project and press Ctrl+B to build it. The build fails with an error message saying "cl.exe is not recognised".
Quit and restart QtCreator 4.2, open the same project and attempt to build it again. The build now succeeds.
I've noticed the failure happening when launching QtCreator immediately after a cold boot into Windows 10, but I don't know whether it's related to that.
I have Visual Studio 2010 and 2015 installed. Both were auto-detected by QtCreator. I haven't tested to see whether the problem also occurs with VS2010 or is specific to VS2015.
The initialisation line for the VS2015 compiler is:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat amd64
which is correct for my system. Running that command from a command prompt is successful; and if I then start QtCreator from that command prompt I never get the problem.
This may be related to
QTCREATORBUG-16397, but the symptoms are different in this case because the compiler setup line is correct.