Monday, November 18, 2013

MSB3147: Could not find required file 'setup.bin' on a x64 machine [.NET 4.5, cont.]

Over two years ago I’ve blogged on how to workaround the problem with building ClickOnce applications on a x64 build server. The solution was to manually create a registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper\4.0 and add the Path value c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\ to it.

This worked for 2 years and last week we were hit with the issue once again. Reason? Well, .NET 4.5 has been installed on the server.

It seems that .NET 4.5 changes the way applications are built (new version of msbuild?). It no longer expects the old v7.0A SDK, instead it expects the v8.0A SDK.

Unfortunately, according to this table, there is no official installer for the v8.0A SDK. It is installed with VS2012 Update 2.

The solution was to:

1) Manually copy the contents of the c:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\Engine folder from a dev machine to the build server

2) Manually create a registry entry HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper\11.0 with Path set to the C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\Bootstrapper\

Important note! Although the setup.bin is physically inside the Bootstrapper\Engine subfolder, the Path points to Bootstrapper rather than Bootstrapper\Engine.

Important note 2! For some reason, the bootstrapper key corresponding to the v7.0A SDK has 4.0 suffix while the key corresponding to the v8.0A SDK ends with 11.0. A lot of unnecessary confusion and I am glad this works despite all this confusion.

1 comment:

Unknown said...

Thanks, worked like a charm!