使用mage.exe为* .deploy文件创建ClickOnce部署清单

编程入门 行业动态 更新时间:2024-10-23 21:33:15
本文介绍了使用mage.exe为* .deploy文件创建ClickOnce部署清单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当应用程序文件具有* .deploy扩展名时,如何使用mage.exe创建ClickOnce部署清单?有些人放弃使用MSBuild.exe和GenerateDeploymentManifest任务.如果您想直接使用mage.exe怎么办?

How does one use mage.exe to create a ClickOnce deployment manifest, when the application files have the *.deploy extension? Some give up and use MSBuild.exe and the GenerateDeploymentManifest task instead. What if you want to use mage.exe directly?

推荐答案

如果您想单独使用mage.exe,您需要知道的是它无法完成.至少不是单独使用mage.exe.

If you want to use mage.exe alone, what you need to know is that it cannot be done. At least not with mage.exe alone.

Mage.exe无法构建用于下载* .deploy文件的部署清单(* .application文件).在签名之前,您必须手动编辑部署清单(* .application文件).具体来说,您需要将mapFileExtensions属性添加到部署XML元素.

Mage.exe does not have a way to build a deployment manifest (*.application file) to download *.deploy files. You must manually edit the deployment manifest (*.application file) before signing it. Specifically, you need to add the mapFileExtensions attribute to the deployment XML element.

作为示例,假设您在名为1.0.0.0.的文件夹中有一个名为ClickOnceText.exe的可执行文件,操作如下:

As an example suppose you have an executable named ClickOnceText.exe in a folder named 1.0.0.0., here is what you do:

> mage -n Application -t 1.0.0.0\ClickOnceTest.exe.manifest -fd 1.0.0.0 -cf ..\code.p12 -pwd passwd ClickOnceTest.exe.manifest successfully signed > mv 1.0.0.0\ClickOnceTest.exe 1.0.0.0\ClickOnceTest.exe.deploy > mage -n Deployment -t ClickOnceTest.application -appm 1.0.0.0\ClickOnceTest.exe.manifest ClickOnceTest.application successfully created > notepad ClickOnceTest.application

这是窍门.将mapFileExtensions添加到部署元素:

And here is the trick. Add the mapFileExtensions to the deployment element:

<deployment mapFileExtensions="true" ... >

然后然后签署部署清单(* .application).

And then sign the deployment manifest (*.application).

> mage -u ClickOnceTest.application -cf code.p12 -pwd passwd ClickOnceTest.application successfully signed

更多推荐

使用mage.exe为* .deploy文件创建ClickOnce部署清单

本文发布于:2023-11-12 07:29:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580882.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:清单   文件   exe   mage   ClickOnce

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!