2017-02-28 204 views
12

在淘寶上網和討論in chat here後,我終於提出了一個關於舊錯誤的新問題。錯誤MSB3147:無法找到所需的文件'setup.bin'發佈到本地失敗

我在Windows 10使用Visual Studio 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> 

如果需要它被設置爲true,這是一個問題。

我也按照this answer on MSDNThis blog

我添加註冊表項:

enter image description here

enter image description here

我也注意到了Windows 10具有內置的.NET框架,它錯過4.0。

enter image description here

我已經卸載了dotNetFx40_Full_setup.exe和運行在Visual Studio中的修復,讓需要它來安裝軟件開發工具包。這沒有幫助。

我有一個MSBuild EXE它應該是according to this

enter image description here

我不知道是否是因爲我失去了.NET SDK 4.0。
它是引導程序的版本嗎? 我不知道如何解決它。有誰知道如何在Windows 10上解決這個問題?

回答

4

The bootstrapper is responsible for the initialization of an application built using the Composite Application Library.

當您設置<BootstrapperEnabled>false</BootstrapperEnabled>時,建立的應用程序的初始化將被省略。如果將其設置爲true,則將執行初始化,然後您將收到錯誤「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

+0

感謝您的支持。我已將該值設置爲12.0。我一直在使用7.0A的Boostrapper,因爲我沒有它8.1A –

+0

不是Boostrapper專家,我不知道8.1A和7.0A之間的差異,GenericBootstrapper版本12.0中的默認值是8.1A,所以我建議這個價值。如果您使用7.0A而不是8.1A而沒有其他問題,請省略不同的版本。此外,你有解決這個問題與上面的答案?如果是,請標記答案。如果沒有,請讓我知道關於這個問題的最新信息?謝謝。 –

+0

好吧,我給你一個upvote,這不是一個錯誤的答案,但你沒有添加任何我還沒有嘗試過的東西。除了你正在使用8.1A和我正在使用7.0A。所以沒有它沒有解決它 –

相關問題