Team build for ClickOnce application with bootstrapper
When one builds an ClickOnce application which requires bootstrapper, the team build might fail with the error message in the build report resembles this:
“C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3604,9): error MSB3147: Could not find required file 'setup.bin' in 'BuildAgent_work_folder\Sources\Project_Root\Engine'. “
The error is raised from a MSBuild task named GenerateBootstrapper. It looks on local machine for the resources to make the bootstrapper setup.exe file. The task searches the bootstrapper resource files (setup.bin and its friends) installation path by checking registry keys one by one:
1. HKLM\Software\Microsoft\GenericBootstrapper\1.0\path
2. HKLM \Software\Microsoft\.NetFramework\SDKInstallRoot<Version> \Bootstrapper
3. HKLM \Software\Microsoft\VisualStudio\ <Version> \InstallDir\Bootstrapper
In each step of the search, if MSBuild finds the registry value is set, it uses the value as the bootstrapper resource installation path and stops searching. If none of these registry value are found, it takes the root path of the ClickOnce project being built. MSBuild tries to locate \engine\setup.bin file under bootstrapper resource installation path. If the file is not found there, MSB3147 occurs.
The bootstrapper files comes as part of .Net Framework SDK. During the SDK installation a set of files/folders are copied to the disk. The registry value is created and set to point to the installation path. On a computer that does not have .Net Framework SDK/Visual Studio IDE installed, none of the registry key would be set. In such case MSBuild will try to find the resource files under the ClickOnce project root and fail there.
So the solution would be to install .Net Framework SDK on the build machine. If one installs windows SDK or Visual Studio IDE, .Net Framework SDK will be installed as a part .
Comments
Anonymous
April 07, 2009
PingBack from http://microsoft-sharepoint.simplynetdev.com/team-build-for-clickonce-application-with-bootstrapper/Anonymous
April 14, 2009
( English Version ) 当使用团队构建(Team Build)来构建带有bootstrapper的ClickOnce应用程序时,构建过程可能会失败,日志中带有如下错误信息(采自英文版)Anonymous
August 17, 2010
Installing only .Net framework SDK is not working. And we cannot install Visual studio on the server. I copied the files from my laptop to the server and added required registry key, with path pointing to the copied files.Anonymous
January 12, 2011
The comment has been removedAnonymous
January 25, 2011
The comment has been removedAnonymous
February 15, 2011
I have Visual Studio 2005, 2008 and Visual Studio 2010 installed. I also have installed Windows 7 SDK and redistributables yet I continue to get this error. I have searched several forums without an answer. Are there other settings such as MSBUild path that installations should have made but could be missing?Anonymous
January 24, 2012
I have installed Visual Studio 2010 with all options selected, but none of the registry entries exist and my C:Program FilesMicrosoft SDKsWindowsv6.0ABootstrapper folder only contains one item - a folder named Packages. I reinstalled VS 2010 with the repair option, but no luck. I installed SP1 for VS as well. Running Windows XP with all updates as of 1/24/2010.