tags:

views:

29

answers:

1

Is there any way to create a clickonce deployment where certain assemblies or files in the manifest can be designated as not needing to be downloaded unless the user performs some action in the application that requires them?

Currently, we have a fairly monolithic ClickOnce application and are researching ways to refactor it into separate assemblies.

I am trying to find a way to reduce the initial payload size when I publish an update and only download assemblies when they are required by the user. Is this possible within the ClickOnce architecture? Is there an alternative?

Thanks, -MrB

+1  A: 

Here's the walkthrough: Walkthrough: Downloading Assemblies on Demand with the ClickOnce Deployment API Using the Designer

Update I would suggest publishing by using the Visual Studio .csproj file. I don't use TFS, but I do use MSBuild. When I need to produce different manifest files for different environments, I have my build script copy and modify the .csproj file as necessary and then build the Publish target on the modified .csproj. If you want to change which files are require/optional during your build, you could do the same thing and modify the .csproj file before building it.

Mike Schenk
This is just what I was looking for. Do you know if I can programmatically mark certain assemblies as optional? We use TFSBuild to automatically generate our application and deployment manifests; and I really don't want to get involved with manually running MageUI for every deployment that we do.
Matthew Belk
Hmmm... Do you simply modify the .csproj XML directly, or are there API calls to modify stuff like the deployment URL, version, and whatnot?
Matthew Belk
I am going down the road of modifying the generated manifest file after I call "mage" from within my TFS Build action, but I am having issues with the XPath query to retrieve the various "dependentAssembly" nodes. I have tried attaching a NamespaceManager to my XPath query since there is a default namespace in the manifest document. Suggestions?
Matthew Belk
You probably ought to post this as a new question. The answer will depend a lot on the specifics of what tools you are using to evaluate the XPath.
Mike Schenk