问题 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

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