Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you publish a ClickOnce application through CruiseControl.NET?

Tags:

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.

like image 810
proudgeekdad Avatar asked Aug 15 '08 17:08

proudgeekdad


People also ask

How do I publish my ClickOnce application?

Publishing with ClickOnce. In Solution Explorer, right-click the project and choose Publish (or use the Build > Publish menu item).

What is .NET ClickOnce?

ClickOnce is a component of Microsoft . NET Framework 2.0 and later, and supports deploying applications made with Windows Forms or Windows Presentation Foundation. It is similar to Java Web Start for the Java Platform or Zero Install for Linux.

How do I publish a ClickOnce in Visual Studio?

In Solution Explorer, right-click the application project and click Properties. The Project Designer appears. Click the Publish tab to open the Publish page in the Project Designer, and click the Publish Wizard button. The Publish Wizard appears.


1 Answers

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.

like image 169
Judah Gabriel Himango Avatar answered Oct 29 '22 23:10

Judah Gabriel Himango