Deploying ClickOnce Application

Hello,

I see on the main page it says Octopus can handle ClickOnce applications but I see no documentation on this feature. How do you accomplish this?

-Corey

Hi Corey,

Thanks for getting in touch!

We have had this question asked before, http://help.octopusdeploy.com/discussions/questions/350-clickonce, with some answers provided.

One user came up with a sample deployment script and application, https://bitbucket.org/jnus/clickonceandoctopusdeploy/wiki/Home, that may help you setting up your own ClickOnce deployment with Octopus Deploy.

I have created a GitHub issue, https://github.com/OctopusDeploy/Issues/issues/968, to update the documentation with instructions on how to setup ClickOnce deployments in Octopus Deploy

Hope that helps!

Henrik

Hi Henrik,

Thanks for your response. I was able to get the clickonce files packaged. There is a bit of an issue though. I want to be able to create multiple packages of the same files but just named differently based on the environment they are going to. Any assistance with this?

-Corey

Hi Corey,

Thanks for the reply.

You could use the Environment parameter #{Octopus.Environment.Name} when generating the application package, this will ensure that the environment that is being deployed will be included in the package name.

Hope that helps!

Henrik

Hi Henrik,

Do you mean to add this to the ID field in the nuspec file? P.S the build happens in TeamCity

-Corey

Hi Corey,

Sorry, I thought you were creating the ClickOnce package in Octopus Deploy, let me do some investigations locally and get back to you as soon as I can.

Thank you,
Henrik

Hi Corey,

Could you send throgh your process for deploying your ClickOnce application? So that I can replicate it as closely as possible to make sure I can find a suitable solution for you.

Thank you,
Henrik

Here`s the process:

  1. TC builds the clickonce application (which includes a service that is built along with it)
  2. TC runs a publish script that zips up the clickonce files with the following naming convention - ClickOnce_$(Configuration).zip (Configuration variable are the different environment names)
  3. TC repeats the same for the service files

P.S We have 5 environments, so it would be five packages with just a different environment name in the naming convention.

Hi Corey,

We’ve discussed this within the team and we think the easiest way you could achieve this to extend the script that zips up your clickonce files to generate a package for each of your 5 environments and push those to your Octopus server.

Then in your Octopus Deploy project, you can have variables scoped for each of your environment with the package that should be deploy to that environment.

I hope that helps!

Henrik