ClickOnce, MSBuild and CAB
April 2nd, 2006
Lately, I’ve been wondering about the strength of ClickOnce
applied in enterprise applications. In these scenarios, the deployment of a
Smart Client application involves more than a simple XCOPY. Let’s enumerate
some of them:
- multiple environments (dev,
qa, staging, production) - prerequisites
- CAS permissions
- run as non-admin
- pre and post-deployment
tasks - partial deploys (only a set
of modules) - rollbacks
- segmented deploy (e.g. only
deploy a beta testers group) - versioning
The truth is that ClickOnce has been designed with some of
these things in mind out of the box but not all of them. Fortunately the ClickOnce
world does not finish in the “Visual Studio 2005 Publish tabâ€. We have MSBuild
tasks,
mage.exe
and mageui.exe
to overcome the advanced scenarios.
A great
sample showing the advanced features has been written by Mike Bouck.
Based on this and my previous post about dynamic
modules, I’m planning to write a sample consisting of a CAB application leveraging ClickOnce
and CAB Module Loader to download
modules on-demand and load them dynamically.
April 3rd, 2006 at 6:50 pm
Deploying involves setup and update, i´m under the impression that click once is more of an updater. Is this so? How is base software installation (like the .net framework itself) supported?
thanks,
gus
April 3rd, 2006 at 10:36 pm
Gus
The base software installation is supported through ClickOnce prerequisites. By configuring the prerequisites ClickOnce creates a setup bootstrapper that will check those prereqs and download them if required and finally install them.
You can create your own prerequisites (it requires some steps). Indeed you could create a custom MSI and have that as a prereq for your ClickOnce app.
I plan to write more about this later this week.
Matias
October 25th, 2007 at 2:54 am
Hi guys,
Good stuff on this site.
I’m struggling with some difficulties by using ClickOnce. I wonder if I could get some help from you.
This is the scenario. I work on a company who distributes its products to an uncertain number of servers. This create some problem for the distribution of the app using clickonce as you have to specify a fixed deployment url when you are publishing. This is the issue #1. How can I manage different deployment urls?
Besides on my app, I have some connection strings to web services that needs to be modified for production. The deal is you never know which one will be the connection string, and as you know the .deploy files are signed and cannot be modified.
I was planning to make an msi to distribute the ClickOnce. And using custom actions to get input from the user and modify the neccesary files on clickonce. I was told that was the right path to go. But I’m clueless about the situation.
Thanks in advance,