Could not find required file 'setup.bin'

前端 未结 6 994
走了就别回头了
走了就别回头了 2020-11-28 10:33

I\'m unable to build a Setup Project in VS2010, for a Windows Service project. It fails with this error:

Could not find required file \'setup.bin\' in

6条回答
  •  被撕碎了的回忆
    2020-11-28 11:07

    With Process Monitor I found that, right before trying to access the path, a DLL is used to retrieve this path. The following may be borderline legal, but I'd like to share my findings anyway.

    The DLL is located at C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll and the class being used is Microsoft.Build.Tasks.Deployment.Bootstrapper.BootstrapperBuilder. Using your favourite disassembly tool, you can find that ultimately three attempts are made at retrieving the path.

    1. HKLM\Software\Microsoft\GenericBootstrapper\11.0\Path
    2. HKLM\Software\Wow6432Node\Microsoft\GenericBootstrapper\11.0\Path
    3. Environment.CurrentDirectory

    I'm unsure why it says 11.0, as far as I can remember VS 2012 has not been installed on this machine before.

    So there's a bug in the SDK installer or there's a bug in the DLL. Either way, creating the 11.0 registry key and adding the value resolves this issue. Note: Visual Studio must be restarted, because after attempting to retrieve the path, it is cached.

    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\GenericBootstrapper\11.0]
    "Path"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bootstrapper\\"
    
    Windows Registry Editor Version 5.00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\GenericBootstrapper\11.0]
    "Path"="C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Bootstrapper\\"
    

提交回复
热议问题