在网上搜索和讨论之后in chat here ,我终于问了一个关于旧错误的新问题。
我在 Windows 10 上使用 Visual Studio Enterprise 2015。
这方面的问答是2011年的 MSBuild: error MSB3147: Could not find required file 'setup.bin' .
这个问题和接受的答案是2012年写的,其他答案是2015年的,有一个是2016年的,没用 Could not find required file 'setup.bin' .
项目的目标版本是 4.0。我正在运行仅从另一台本地计算机运行的 psl 脚本。
我一直收到这个错误:
C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(4769,5): error MSB3147: Could not find required file 'setup.bin' in 'C:\dev\xxx\src\xxx\Engine'. [C:\dev\xxx\src\xxx \xxx.csproj] Publish to Local FAILURE
我已经尝试了每个答案中的每个解决方案。唯一有效的是来自 this answer
<BootstrapperEnabled>false</BootstrapperEnabled>
如果需要设置为真,这是一个问题。
我也关注了this answer on MSDN . This blog .
我添加了注册表项:
我还注意到 Windows 10 内置了 .NET 框架,但它缺少 4.0。
我卸载了 dotNetFx40_Full_setup.exe 并在 Visual Studio 上运行修复以允许它根据需要安装 sdks。这没有帮助。
我有一个 MSBuild exe,它应该是 according to this :
我想知道是不是因为我缺少 .NET sdk 4.0。
它是 Bootstrap 的版本吗?
我不知道如何解决它。有谁知道如何在 Windows 10 上解决这个问题?
最佳答案
The bootstrapper is responsible for the initialization of an application built using the Composite Application Library.
当您设置 <BootstrapperEnabled>false</BootstrapperEnabled>
时, 构建的应用程序的初始化将被省略。如果将其设置为真,将执行初始化,然后您将收到错误消息“MSB3147:找不到所需的文件'setup.bin'”。
根据你的描述和图片,我发现你有 MSBuild 12.0,但将 GenericBootstrapper 的值添加到 MSBuild 4.0 注册表项中。
Starting in Visual Studio 2013, the MSBuild Toolset version is the same as the Visual Studio version number.
因此请检查 GenericBootstrapper 的注册表值,版本为 12.0。 如果该值不存在或不正确,请添加值“C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\Bootstrapper”。
关于.net - 错误 MSB3147 : Could not find required file 'setup.bin' Publish to Local FAILURE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42499092/