How to you publish a ClickOnce application through CruiseControl.NET

clickoncecruisecontrol.netmsbuildpublish

I have CruiseControl.NET Version 1.4 set up on my development server. Whenever a developer checks in code, it makes a compile.

Now we're at a place where we can start giving our application to the testers. We'd like to use ClickOnce to distribute the application, with the idea being that when a tester goes to test the application, they have the latest build.

I can't find a way to make that happen with CruiseControl.NET. We're using MSBUILD to perform the builds.

Best Answer

We've done this and can give you some pointers to start.

2 things you should be aware of:

  • MSBuild can generate the necessary deployment files for you.
  • MSBuild won't deploy the files to the FTP or UNC share. You'll need a separate step for this.

To use MSBuild to generate the ClickOnce manifests, here's the command you'll need to issue:

msbuild /target:publish /p:Configuration=Release /p:Platform=AnyCPU; "c:\yourProject.csproj"

That will tell MSBuild to build your project and generate ClickOnce deployment files inside the bin\Release\YourProject.publish directory.

All that's left is to copy those files to the FTP/UNC share/wherever, and you're all set.

You can tell CruiseControl.NET to build using those MSBuild parameters.

You'll then need a CruiseControl.NET build task to take the generated deployment files and copy them to the FTP or UNC share. We use a custom little C# console program for this, but you could just as easily use a Powershell script.

Related Topic