Reputation: 31
For our build system I want to be able to make sure only VS2012 Update 1 is used and not basic VS2012. How can I do this programatically?
Normally, I'd check that the correct Service Pack is installed. But this is an update, not a Service Pack. So all the registry entries for Service Packs still say zero.
Ah, I have investigated further...
In all cases, we check the version of the compiler matches what we expect. I was led astray because the amd64 version of cl.exe reports the same version as pre-Update 1 (17.00.50727.1) so I was looking for some other way to do the detection. On the other hand, the x86, x86_amd64, and x86_arm versions of cl.exe all report a new version (17.00.51106.1).
A couple of people have already asked for clarification of whether this is intended in the comments to the MS blog post about the update without any response.
I suppose I could check the version in crtversion.h, but am now worried that the amd64 compiler has not been updated to work correctly with the new CRT.
Upvotes: 2
Views: 638
Reputation: 17385
If you want a registry key that changes between VS2012 and VS2012 Update 1 I recommend you check in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0\SplashInfo
In Visual Studio 2012 there isn't a EnvVersion
key.
In Visual Studio 2012 Update 1 it exists with the following value:
EnvVersion = 11.0.51106.01 Update 1
Upvotes: 1