当应用程序文件具有* .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部署清单
发布评论