問題 Reference in the manifest does not match the identity of the downloaded assembly 解決方案彙總

WPF程序以ClickOnce發佈的時候,遇到問題:

Reference in the manifest does not match the identity of the downloaded assembly

搜索若干方案,未湊效,整理如下:

1,In project properties -> Application tab -> Resources -> checkbox Icon and manifest, the setting "Embed manifest with default settings" caused the problem. Setting it to "Create application without a manifest" fixes the problem.

2,The resolution would be to manually edit the csproj file and remove all entries of "<Prefer32Bit>true</Prefer32Bit>" element or change its value to false like <Prefer32Bit>false</Prefer32Bit>

3,On Visual Studio 2008 onwards, by default it embeds manifest information into assemblies. Hence, the resolution is to include /nowin32manifest while building your application. Another approach would be to exclude the embedded manifest file after building the application. In order to do that please open Visual Studio IDE and Open the executable file from the menu (File—>Open—>File)

以上方式爲通用方式,但是還爲解決本項目問題,採用遞增方式提交各個change(之前大量功能未提交,均爲local change),通過一次次提交,最終鎖定問題根源:

Root Cause:WPF程序引用的其中一個項目也爲Windows Application,

Sulution: 因直接更改項目類型會出現新問題, 故拷貝項目至另外目錄,重新創建class library項目,將類等都搬遷至新項目。

 

【參考】

1, https://blogs.msdn.microsoft.com/smondal/2012/02/28/reference-in-the-manifest-does-not-match-the-identity-of-the-downloaded-assembly-2/

2,https://code.i-harness.com/en/q/517172

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章