无法更改已部署的 WPF 应用程序的清单

发布于 2024-12-25 06:53:07 字数 688 浏览 1 评论 0原文

嗯..我真正需要的是允许用户安装同一应用程序的两个不同版本。更改程序集名称只会产生大量错误,需要大量工作。我一直在阅读,更改程序集标识告诉 WPF 这些是不同的应用程序,因此第二个应用程序(它是 ClickOnce)不会替换以前安装的应用程序。遗憾的是,这不能在 VS2010 中更改。

我在这里更改了 MyApp.exe.manifest,我认为:

assemblyIdentity name =“MyWPFApp_NEWNAME” version =“1.0.0.0” language =“neutral”processorArchitecture =“x86”

并退出了清单方式:

ma​​ge.exe -update MyWPFApp.exe.manifest -certfile D:\MyDir\MyWPFApp_TemporaryKey.pfx

ma​​ge.exe -update MyWPFApp.application -appmanifest MyWPFApp.exe.manifest -certfile D:\MyDir\MyWPFApp_TemporaryKey.pfx

签名状态成功,但在尝试打开应用程序时出现错误,指出哈希计算错误...

因为这是我第一次尝试修改已部署的应用程序,毫无疑问我做错了什么...

Well.. what I'm really needing is to allow the user to install two different versions of the same application. Changing the assembly name just generates a lot of errors that require too much work. I've been reading that changing the assembly identity tells WPF that those are different applications and so the second application (it's a ClickOnce) doesn't replace the previously installed. Sadly this cannot be change inside VS2010.

I've changed the MyApp.exe.manifest here, I Think:

assemblyIdentity name="MyWPFApp_NEWNAME" version="1.0.0.0" language="neutral" processorArchitecture="x86"

And resigned the manifest this way:

mage.exe -update MyWPFApp.exe.manifest -certfile D:\MyDir\MyWPFApp_TemporaryKey.pfx

mage.exe -update MyWPFApp.application -appmanifest MyWPFApp.exe.manifest -certfile D:\MyDir\MyWPFApp_TemporaryKey.pfx

the signing states sucessfull, but when trying to open the application it get an error stating that the Hash is misscalculated...

As this is my first try to modify a deployed application with no doubt I'm doing something wrong...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

冬天的雪花 2025-01-01 06:53:07

您是否尝试过右键单击启动项目并转到属性。然后在“应用程序”选项卡的属性中查找“程序集信息”按钮。单击该按钮并更改所需的值。重建您的项目,然后尝试让用户在仍安装旧版本的情况下安装此版本。

Have you tried right clicking on your start-up project and going to properties. Then in properties in the "Application" tab look for "Assembly Information" button. Click that button and change the desired values. Rebuild your project and then try to get the user to install this version while an older version is still installed.

〆凄凉。 2025-01-01 06:53:07

解决了...(每当我发布问题时,这种情况总是发生在我身上)让客户端将版本检测为不同的应用程序,我所需要做的就是为每个部署创建不同的密钥文件(pfx)并更改“应用程序名称”应用程序属性中的“组”。

Solved... (this always happens to me as soon as I post a question) for client to detect the versions as different applications all I needed was to create a different key file (pfx) for each deployment and change the "Name of application group" in the application properties.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文