0

I'm publishing a ClickOnce application that has a few dependencies in the form of DLLs. When I publish the initial version 0.0.1 all the dependencies are copied into the deployment folder as I would expect.

If I make an update and publish version 0.0.2 all of the same dependencies, which are unchanged and have the same file hash, are copied into a second subfolder within the deployment folder.

The folder structure looks like this:

deployment/
    MyApplication.application
    setup.exe

    Application Files/
        MyApplication_1_0_0_1/
            Dll_A.dll - Hash: 0x111111111111111
            Dll_B.dll - Hash: 0x222222222222222

        MyApplication_1_0_0_2/
            Dll_A.dll - Hash: 0x111111111111111
            Dll_B.dll - Hash: 0x222222222222222

Is there any way to only have one copy of Dll_A.dll/Dll_B.dll when they are the same file and only have a new copy if they change?

I'm referring to the size of the directory on the developer's end. Not the size of the download and cache that clients have as I understand ClickOnce already takes care to minimize that.

wooobie
  • 345
  • 2
  • 12

2 Answers2

1

My issue came from a misunderstanding of how the Application Files directory works.

Yes there is a new folder with the same DLLs made each time, but for upgrades to work you do not need to keep all of the folders in it. You can erase all of them except for the most recent release and have no ill effects.

Even if someone is between versions/missed upgrades they will simply pull the latest version when their program updates. They don't need the intermediate versions they missed inbetween.

wooobie
  • 345
  • 2
  • 12
0

I don't believe ClickOnce allows for that granular of control.

Edit: Found this, it may help with your question on the cleanup. ClickOnce deployment is leaving multiple versions (yes, more than two)

Community
  • 1
  • 1
utd1878
  • 95
  • 1
  • 9
  • Thanks but that question actually applies to the client/install machine and not the deployment server. – wooobie Mar 29 '17 at 17:12