3

I've got small wpf application deployed using ClickOnce technology. The problem is that when I build new version clients download all files, though many of these files have not been changed. I use following configuration to make deployment manifest

<GenerateDeploymentManifest AssemblyName="MyApp.exe.application"
  AssemblyVersion="1.0.0.0"
  DeploymentUrl="\\...\MyApp.exe.application"
  Product="Egs.Client"
  TargetCulture="ru-RU"
  Description="My application"
  Publisher="MyCompany"
  Install="true"
  UpdateInterval="1"
  UpdateUnit="Weeks"
  UpdateEnabled="true"
  UpdateMode="Background"
  OutputManifest="$(ApplicationFile)"
  MapFileExtensions="true"
  EntryPoint="@(DeploymentManifestEntryPoint)" />

Even If I just change "1.0.0.0" to "1.0.0.1" clients will download whole application again. Am I missing something or it's standart behaviour ?

Alex Ilyin
  • 1,294
  • 1
  • 12
  • 22

1 Answers1

2

If an assembly changes at all it will be downloaded. Rebuilding an assembly counts as a change. I typically skip Visual Studio for creating deployments and use Mage instead. Then I don't point Mage at the bin where all the assemblies get built, I point it at a separate folder where I manually copy in assemblies I want deployed. Make sense?

codeConcussion
  • 12,739
  • 8
  • 49
  • 62
  • Hi, thanks for your answer. I do not use VisualStudio either, I also use Mage for deployment. Am I right that if I use command like mage.exe -New .... then all files will be re-downloaded and mage.exe -Update should be used instead ? – Alex Ilyin Aug 25 '10 at 04:40
  • -New or -Update should not matter. The main thing to watch is if you don't want an assembly to be deployed, you need to build your new deployment with **that exact same** assembly, not a rebuilt version of that assembly. ClickOnce hashes your files, that's how it knows what to download; it compares the client's file hashes with the server, any files that are different get downloaded. Doing **anything** to an assembly, including rebuilding it, will cause a different hash to be generated which will cause it to be downloaded. – codeConcussion Aug 25 '10 at 06:03