none
error MSB3147: Could not find required file 'setup.bin' in 'C:\BUILD\MyProject\Engine' RRS feed

  • Question

  • Background: I am updating an automated build process which was using VS2008 / .NET 3.5 as we are migrating to VS2010. VS2010 and .NET 4.0 are now installed. As a first step in the process, I tried to replace a call to msbuild 3.5 to the new msbuild 4.0 x64. The project itself is still 3.5 / vs2008 and is built using devenv for VS2008. The msbuild part is purely for Publishing the client application.

    After switching the command line to use the new msbuild, we are getting the error message referred to in the subject. Please note that there are no antivirus issues (I have read of folks getting that problem with this message as well). In this case, msbuild simply seems to be looking for the "setup.bin" in the wrong place, as far as I can tell.

     

    msbuild /t:clean;publish /v:d /nologo /p:SolutionDir=C:\BUILD\ /p:PublishDir=\\fileserver\MyProject\ClickOnce\ /p:PublishUrl=\\fileserver\MyProject\ClickOnce\ /p:InstallUrl=\\fileserver\MyProject\ClickOnce\ /p:ApplicationVersion=1.0.2.357 C:\BUILD\MyProject\MyProject.csproj

     

    Build started 4/29/2010 1:43:11 PM.
    Overriding target "SatelliteDllsProjectOutputGroup" in project "C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets" with target "SatelliteDllsProjectOutputGroup" from project "C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.WinFX.targets".
    Project "C:\BUILD\MyProject\MyProject.csproj" on node 1 (clean;publish target(s)).
    Building with tools version "3.5".
    
    ...
    Done building target "_CopyFilesToPublishFolder" in project "MyProject.csproj".
    Target "_DeploymentGenerateBootstrapper" in file "C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets" from project "C:\BUILD\MyProject\MyProject.csproj" (target "PublishOnly" depends on it):
    Using "GenerateBootstrapper" task from assembly "Microsoft.Build.Tasks.v3.5, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
    Task "GenerateBootstrapper"
    C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets : warning MSB3155: Item 'Microsoft.Windows.Installer.3.1' could not be located in 'C:\BUILD\MyProject'. [C:\BUILD\MyProject\MyProject.csproj]
    C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets : warning MSB3155: Item 'Microsoft.Net.Framework.3.5.SP1' could not be located in 'C:\BUILD\MyProject'. [C:\BUILD\MyProject\MyProject.csproj]
    C:\Windows\Microsoft.NET\Framework64\v3.5\Microsoft.Common.targets(3604,9): error MSB3147: Could not find required file 'setup.bin' in 'C:\BUILD\MyProject\Engine'. [C:\BUILD\MyProject\MyProject.csproj]
    Done executing task "GenerateBootstrapper" -- FAILED.
    Done building target "_DeploymentGenerateBootstrapper" in project "MyProject.csproj" -- FAILED.
    Done Building Project "C:\BUILD\MyProject\MyProject.csproj" (clean;publish target(s)) -- FAILED.
    
    Build FAILED.

    Thursday, April 29, 2010 9:13 PM

All replies

  • Hi Lex3001,

    Thanks for your post.

    This error message shows occurs when the bootstrapper could not find setup.bin on disk. 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.

    So I guess your issue is because there is not Bootstrapper key under .NETFrame 3.5, I would suggest you try to use Version 4.0 to build your source file, you can specify version in command line by /toolversion 4.0 or insert it to source file, for example:

    <Project ToolsVersion="4.0" DefaultTargets="Build" 
    xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

     For more information about MSB3147, please refer to Emma's blog with following link, it gives you good explanation.

    http://blogs.msdn.com/emmamou/archive/2009/04/08/team-build-for-clickonce-application-with-bootstrapper.aspx

    If you have any comments, please feel free to let me know.

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Friday, April 30, 2010 3:28 AM
  • Hi Lex3001,

    I am writing to follow up this issue. Please let me know what I can help. Thanks.

     

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, May 4, 2010 6:30 AM
  • Thanks for following up. I must have missed the alert on your original reply.

    I had a question about your reply. It sounds like your proposed solution is for using MSBuild 3.5 and to get it to reference the setup.bin for 4.0? Or perhaps I misunderstood.

     

    In any case, to be clear, we have rolled our auto-build back to msbuild 3.5 which appears to be working even though the project we are deploying with ClickOnce is now being build by devenv 2010. We are still targeting 3.5, so maybe that's why it still works.

     

    If we were to try going back up to msbuild 4.0, you believe that adding the ToolsVersion option would solve the problem? I'll give that a try sometime in the next few days.

    Tuesday, May 4, 2010 6:38 AM
  • Hi Lex3001,

    Have you checked whether a value indicating the path of Bootstrapper such like : c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\ under the subkey HKLM\Software\Microsoft\GenericBootstrapper\3.5\path ? If not, the first thing is to check where is setup.bin, and try to manually add this path to this subkey.

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Wednesday, May 5, 2010 5:40 AM
  • Could you please clarify in your note above:

     

    1. Is the Windows SDK version (6.0A vs 7.0A etc) based on the version of MSBUILD being used or based on the target framework of the project being signed?

     

    2. Is the Bootstrapper version (3.5 vs 4.0) based on the version of MSBUILD being used or based on the target framework of the project being signed?

     

    Thanks

    Wednesday, May 5, 2010 3:06 PM
  • Hi lex3001,

    Sorry for the delay.

    1. I think it will be based on the version of MSBuild to search the corresponding version of SDK, but MSBuild will read the project file and determine to use which verison to build this. You will find following sentence on the top of project file:

    <Project ToolsVersion="3.5"

    In this case, it will call MSBuild 3.5 to build this. About Windows SDK versions, Please check Microsoft Windows SDK on Wikipedia website for more information. 

    2. It's the same as above.

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, May 11, 2010 7:10 AM
  • Hi Nancy,

     

    I'm a little confused by "it will call MSBuild 3.5 to build this". As I pointed out in my original post, we are using a custom build program to run MSBuild manually for creating the one click deployment. We tried to changing this to MSBuild 4.0 and that is when we ran into the problem, so we switched back to MSBuild 3.5. We are trying to troubleshoot why using MSBuild 4.0 failed.

     

    Tuesday, May 11, 2010 10:11 PM
  • Hi Lex3001,

    As my previous reply:

    Have you checked whether a value indicating the path of Bootstrapper such like : c:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\ under the subkey HKLM\Software\Microsoft\GenericBootstrapper\3.5\path ?

    What's the path value of this subkey? I have not found the answer from your replies.

    Regards,

    Nancy Shao [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, May 18, 2010 9:03 AM
  • Hi Nancy,

    I am having similar problem when deploying a wpf(3.5) app using ClickOnce,  MSBuild 4 and CruiseControl . Please take a look at this post.

    http://social.msdn.microsoft.com/Forums/en/winformssetup/thread/6964ba78-5b66-4cd1-bdd1-b31edb76b96a



    For some reason the Bootstrapper folder in c:\Program Files\Microsoft SDKs\Windows\v6.0 ,6.1, 7.0 or 7.1 is missing on my build server. Following SDKS are already installed on my build server

    • Windows SDK for Windows Server 2008 and .NET Framework 3.5
    • Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
    • Microsoft Windows SDK for Windows 7 and .NET Framework 4


    I have even tried copying the Bootstrapper folder from my development machine but no luck.

    Any idea?

     

    Thanks

    Nabeel


    Nabeel Farid
    Wednesday, August 25, 2010 5:32 PM
  • Hi Nancy,

    I have recently setup cruisecontrol to run my MSBUILD process. This is the cruise command being called from the tasks block.

          <msbuild>
            <executable>C:\WINNT\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
            <workingDirectory>$(sandboxDirectory)\MBS_PMR_TRUNK\BuildTools\ccnet_scripts</workingDirectory>
            <projectFile>Deploy_MBS_PMRClient.proj</projectFile>
            <buildArgs>/noconsolelogger /v:n /p:Environment=DEV</buildArgs>
            <logger>D:\apps\CC.NET_MBS\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
          </msbuild>

    On running MSBUILD against this proj file I get the error:

    D:\data\sandboxes\MBS_PMR_TRUNK\BuildTools\ccnet_scripts\Deploy_MBS_PMRClient.proj (168,5): errorMSB3147: Could not find required file 'setup.bin' in '\Bootstrapper\Engine'.

    I have checked the registry you mention: HKLM\Software\Microsoft\GenericBootstrapper\1.0\path and it has the path C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\. I have checked here and the \Engine\setup.bin is here. I am not sure why it is still not working.

    I have also added C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Engine;C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin; to the system PATH variable but it has made no difference. Nb. I had to add the path to v6.0A\bin for MSBUILD to be able to find MAGE.exe, so i thought it would need something similar to find setup.bin!

    I might resort to installing VS2005 which is not the best solution but might work...at least having VS2005 and its service pack and VS2008 and its service pack on my previous build machine did work!

    Any help would be much appreciated.

     

    Thanks,

    Ku

    Thursday, September 9, 2010 10:18 PM
  • Well, it seems that the SDKPath being set from:

    <GetFrameworkSdkPath>
          <Output TaskParameter="Path" PropertyName="SdkPath" />
    </GetFrameworkSdkPath>

    was empty! I have for now manually set this property and it is working now but if anyone knows why it would be empty....please advise so that I can remove this HACK!

    Thanks.

    Friday, September 10, 2010 9:32 AM