本文介绍了使用NAant脚本进行ClickOnce部署?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用NAant脚本部署ClickOnce吗?
嗨!
我有一个C#应用程序,想要为其创建自动化的ClickOnce部署脚本.
我正在用NAant和一个构建文件来做.它工作正常,但我想知道我做的方式是否正确?!
您可以在下面看到构建文件的相关部分.
我特别想知道每次更新完成后都应该使用新应用程序"和新部署"开关是否正确吗?!
谁能给我一些意见?
ClickOnce deployment with NAant script?
Hi!
I have a c# application for which I want to make an automated ClickOnce Deployment script.
I''m doing it with NAant together with a build file. It works fine, but I wonder if the way I''ve done it is the right way to go?!
Below you can see the relevant parts of the build file.
I especially wonder if it is correct to use the "New Application" and "New Deployment" switch should be used every time an update is done?!
Can anyone give me some input?
<!-- Copy all the files to the deploy folder -->
<echo message="Copying Application files from ${build.dir} to $${Deployment.dir}\${publish.version}." />
<delete dir="${Deployment.dir}\${publish.version}" failonerror="false" />
<mkdir dir="${Deployment.dir}\${publish.version}" />
<copy todir="${Deployment.dir}\${publish.version}" overwrite="true" includeemptydirs="true" >
<fileset basedir="${build.dir}">
<includes name="**" />
</fileset>
</copy>
<!-- Creating Application Manifest -->
<echo message="Creating application manifest ${Deployment.dir}\${publish.version}\Application.exe.manifest." />
<exec program="mage" commandline="-New Application -t ${Deployment.dir}\${publish.version}\Application.exe.manifest -fd ${build.dir} -Name Application -Version ${publish.version}" />
<exec program="mage" commandline="-Sign ${Deployment.dir}\${publish.version}\Application.exe.manifest -CertFile Application.pfx -Password pwd_Application" />
<!-- Creating Deployment Manifest -->
<echo message="Creating deployment manifest ${Deployment.dir}\${publish.version}\Application.exe.manifest." />
<exec program="mage" commandline=''-New Deployment -t ${Deployment.dir}\Application.application -pu ${publish.url}\Application.application -Name Application -i true -appm ${Deployment.dir}\${publish.version}\Application.exe.manifest -Version ${publish.version}'' />
<exec program="mage" commandline="-Update ${Deployment.dir}\Application.application -MinVersion ${publish.version} -UseManifestForTrust true -Publisher MyCompany" />
<exec program="mage" commandline="-Sign ${Deployment.dir}\Application.application -CertFile Application.pfx -Password pwd_Application" />
推荐答案
这篇关于使用NAant脚本进行ClickOnce部署?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!