.net - 错误 MSB3147 : Could not find required file 'setup.bin' Publish to Local FAILURE

标签 .net windows visual-studio powershell msbuild

在网上搜索和讨论之后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 .

我添加了注册表项:

enter image description here

enter image description here

我还注意到 Windows 10 内置了 .NET 框架,但它缺少 4.0。

enter image description here

我卸载了 dotNetFx40_Full_setup.exe 并在 Visual Studio 上运行修复以允许它根据需要安装 sdks。这没有帮助。

我有一个 MSBuild exe,它应该是 according to this :

enter image description here

我想知道是不是因为我缺少 .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”。 enter image description here

关于.net - 错误 MSB3147 : Could not find required file 'setup.bin' Publish to Local FAILURE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42499092/

相关文章:

c++ - Qt 中的 GMock 和 undefined reference 错误

c# - 在 C# 中使用 TaskDialogIndirect

c# - 帮助 : Call C# winforms dll from VB6 project?

c# - 当我使用设计器向表单添加新控件时,如何阻止 visual studio 更改 WPF 表单中控件的属性?

c++ - 找不到加载文件 OpenCVModules.cmake

c# - .Net Speech.Synthesizer 中的内存泄漏?

c# - 显式使用 "new EventHandler"声明有好处吗?

c# - 当上下文中不存在 where/select 时,在包含 Include 的查询中使用 where/select ?相关表上的Where 是否需要包含?

c# - 将大量脚本作为嵌入式资源包含到项目中是一种不好的做法吗?

c# - 将启用 Ajax 的 WCF 服务公开给 C# 代码