<p>Our team develops distributed winform apps. We use ClickOnce for deployment and are very pleased with it.</p>

<p>However, we've found the pain point with ClickOnce is in <em>creating</em> the deployments. We have the standard dev/test/production environments and need to be able to create deployments for each of these that install and update separate from one another. Also, we want control over what assemblies get deployed. Just because an assembly was compiled doesn't mean we want it deployed.</p>

<p>The obvious first choice for creating deployments is Visual Studio. However, VS really doesn't address the issues stated. The next in line is the SDK tool, Mage. Mage works OK but creating deployments is rather tedious and we don't want every developer having our code signing certificate and password.</p>

<p>What we ended up doing was rolling our own deployment app that uses the command line version of Mage to create the ClickOnce manifest files.</p>

<p>I'm satisfied with our current solution but is seems like there would be an industry-wide, accepted approach to this problem. Is there?</p>

[{'answer_id': 20806, 'author': 'Dale Ragan', 'author_id': 1117, 'author_profile': 'https://Stackoverflow.com/users/1117', 'pm_score': 5, 'selected': True, 'text': '<p>I would look at using <a href="http://msdn.microsoft.com/en-us/library/0k6kkbsd.aspx" rel="noreferrer">msbuild</a>.  It has built in <a href="http://msdn.microsoft.com/en-us/library/6wc2ccdc.aspx" rel="noreferrer">tasks</a> for handling clickonce deployments.  I included some references which will help you get started, if you want to go down this path.  It is what I use and I have found it to fit my needs.  With a good build process using msbuild, you should be able to accomplish squashing the pains you have felt.</p>\n\n<p>Here is <a href="http://windowsclient.net/Articles/ClickOnce_MsBuild.aspx" rel="noreferrer">detailed post</a> on how ClickOnce manifest generation works with MsBuild.</p>\n'}, {'answer_id': 20828, 'author': 'Guy Starbuck', 'author_id': 2194, 'author_profile': 'https://Stackoverflow.com/users/2194', 'pm_score': 3, 'selected': False, 'text': "<p>I've used nAnt to run the overall build strategy, but pass parameters into MSBuild to compile and create the deployment package.</p>\n\n<p>Basically, nAnt calls into MSBuild for each environment you need to deploy to, and generates a separate deployment output for each.  You end up with a folder and all ClickOnce files you need for every environment, which you can just copy out to the server.</p>\n\n<p>This is how we handled multiple production environments as well -- we had separate instances of our application for the US, Canada, and Europe, so each build would end up creating nine deployments, three each for dev, qa, and prod.</p>\n"}]
['https://Stackoverflow.com/questions/20728', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1321/']