使用mage.exe为* .deploy文件创建ClickOnce部署清单 [英] Use mage.exe to create a ClickOnce deployment manifest for *.deploy files

查看:211
本文介绍了使用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部署清单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆