tags:

views:

89

answers:

2

I was wondering why my ClickOnce deployment contains the same .dll in multiple folders that reside on the client once it is installed. Im assuming its becasue the same assembly is being referenced by 2 different assemblies that are deployed.

That brings me to the next questions: 1.) Why? It seems like a waste to have the file there twice 2.) MOST IMPORTANT: Is the file downloaded twice during the ClickOnce install or is it just copied to 2 locations once its downloaded? I can live with the latter even tho its a waste.

Thanks, i hope someone can give me some insight, i was surprised as to how hard it is to find info about this.

edit

After completely clearing my 2.0 cache folder, a new install of a ClickOnce application yields the following (for example)

C:\Documents and Settings\schmoopy\Local Settings\Apps\2.0\G57TKZ28.WP3\156X8 QYO.XDZ\comp..p282_0000000000000000_0003.003e_485502fc487b00ff\CrystalDecisions. Shared.dll C:\Documents and Settings\schmoopy\Local Settings\Apps\2.0\G57TKZ28.WP3\156X8 QYO.XDZ\crys..ared_692fbea5521e1304_000c.0000_none_badb756f818b0fe2\CrystalDecis ions.Shared.dll

done...

They are the same version .dll

+1  A: 

I have looked long and hard for the same answer without luck. My assumption (no facts to back this up, but seems like a logical guess) is that it is because of how it shadow-copies the files. The ClickOnce installer is initiated by the application process starting, so the files are copied into a running process.

Ryan Farley
That makes a lot of sense since you can also check for an updated version of your application while the app is running. If you didn't copy dll's into a separate folder, than you'd have problems copying over a locked file.
Nick
+1  A: 

Running Fiddler while you download the application will show you whether the file gets downloaded more than once. Fiddler is pure awesome. I use it daily and it's free.

Also, ClickOnce keeps the current version and one prior on your machine. Maybe that's where the duplicates are showing up.

whatknott
Ha, nice. I hadnt used fiddler in a while, beta2 seems to have some nice new workings... Thank you for that, i verified the files indeed are not brought down twice from the deployment location.I give you upvote. Still would like to know why there are 2 copies of the assembly locally.
schmoopy