Currently I have a WPF
application that is deployed via clickOnce
deployment in VisualStudio
.
I want to include this deployment in NAnt
.
I have followed this blogpost: http://weblogs.asp.net/joewrobel/archive/2013/02/06/automating-clickonce-deployment.aspx
With it I have managed to automate deployment of files, manifest, app signing and zipping the deployment.
One thing I am missing is making setup.exe.
In VisualStudio this is done in: "project properties/publish/prerequisites"
Can someone help me putting this action in my NAnt
build script?
You should install NAntContrib
(in case you haven't already done it). It contains the task msbuild
. As its name already says, it uses msbuild to build your project. To make sure msbuild creates your setup file as well, you need to set the switch target
to publish
.
You would need to use it to build your projects instead of the target csc
or solution
or whatever you were using. That's because you can add any arguments you want to the msbuild
task which is not possible in the others.
In NAnt, this would look something like this:
<msbuild project="D:\Projects\ProjectName.sln">
<arg value="/target:publish" />
</msbuild>
This should create a folder called "app.publish" in your output path containing the setup file.
NAntContrib (The download contains install instructions)