12

I'm trying to use MSBuild (under CruiseControl) to build the installation for my .NET 4 app. The installation build should create a boostrapper to install the prerequisite (.NET 4 and Windows Installer 4.5 in this case), this is done using the GenerateBootstrapper Task.

Running MSBuild.exe project.msbuild.xml from the command line on a development machine, which has VS 2010 installed, works fine. Running on the build machine, which only has the latest Windows 7 SDK, fails with the error:

(ProductDistributions target) -> bootstrapper.xml(236,5): error MSB3147: 
Could not find required file 'setup.bin' in '<project path>\ProductDistributions\Engine'.

On the dev machines, I have a C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Engine folder containing a setup.bin file, but on the build machine there is no Bootstrapper folder inside C:\Program Files\Microsoft SDKs\Windows\v7.1 (the 7.1 vs 7.0A is apparently because VS2010 installs 7.0A, but the standalone SDK is 7.1).

Also, on the build machine there is no 4.0 registry key inside HKLM\Software\Microsoft\GenericBootstrapper\, but the dev machines do have one containing a path string with a value of c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\

It looks like there's something I need to install on the build machine to add the Bootstrapper folder to "Microsoft SDKs\Windows\v7.1" (and setup the registry keys), but I'm not sure what that is. Any idea what I need to get?

Or is there something else I need to get my installation build working?

Updated: I have this working at the moment by manually copying the 7.0A bootstrapper folder from a dev machine onto the build machine, and manually adding that path to the HKLM\Software\Microsoft\GenericBootstrapper\4.0 registry key. Which seems to work, but it seems like this can't be what I'm supposed to do to fix the problem. So I'd appreciate if anyone has a less-hacky solution to this.

Wilka
  • 28,701
  • 14
  • 75
  • 97
  • The above change of copying the 7.0A bootstrapper and manually adding the reg key fixed the problem I had. I am still looking for a less hacky solution though, – IndigoDelta Jun 20 '11 at 16:23
  • 2
    Did you happen to install the .Net 4.5 beta on that machine? I had some similar problems on my workstation until I completely uninstalled 4.5 (everything referencing 4.5 and VS11 in add/remove programs) and re-installed 4.0 from MSDN. – Dax Fohl Apr 04 '12 at 16:44
  • Nope, this question was from Jan 2011 - so before 4.5 beta was available. – Wilka Apr 05 '12 at 09:24
  • Removing .Net 4.5 (release) and reinstalling 4.0 worked on my TeamCity server. – squillman Aug 03 '13 at 08:11

2 Answers2

4

According to this blog entry the bootstrapper files are installed during the .NET Framework SDK install. It also shows the registry entries that are searched to look for the bootstrapper directory.

You could try installing the .NET Framework SDK or manually set it up by copying the files and adding the registry entries.

Brian Walker
  • 8,658
  • 2
  • 33
  • 35
  • 1
    Hmmm, the build machine already had .NET SDK and Windows SDK (which should also install it), but I tried a reinstall anyway and it didn't fix the problem. I did consider just copying the files, but I wasn't sure if that would cause other problems - all the dev machines have 7.0A and the build machines are 7.1, so copying 7.0A might not work. I guess I'll just see what happens. – Wilka Jan 04 '11 at 16:22
  • 1
    That seems to work, but it does feel like the wrong solution. I'll wait a bit before accepting this answer in case somebody comes along with a less-hacky solution. Thanks though, I now have installs building again. – Wilka Jan 04 '11 at 17:00
  • For futher reference: [this blog](http://jake.ginnivan.net/clickonce-bootstrapping-errors/) shows that somehow windows loose its reference to the file. So, adding the registry key and copying the engine folder to the project folder does solves this issue. – Paulo Bueno Jan 05 '16 at 10:45
2

I'm experiencing the same problem but hadn't tried manually copying over the files and hacking the registry although I've heard from other as well that they have also had success doing so.

In order to get a more real solution for this I've created a feature request on the Connect.Microsoft.com site to implement some type of minimal install of Visual Studio in order to provide for an easier way to set up a Build Server with the necessary development files. Please vote and/or comment on the feature request to help bring attention to this issue.

jpierson
  • 16,435
  • 14
  • 105
  • 149