Reputation: 995
In short:
Clickonce is deleting some old files on upgrade but not all of them, its leaving behind all my content data that's included in the publish and only deleting the compiled app data inside the folder. How do I setup the deployment so that it deletes the content (images and shape file) too?
Detailed:
I have a winforms application that requires images and mapping shape files to be included in the deployment, and we are deploying the application using clickonce.
Clickonce itself is working fine - the files are copying the way they are meant to be and in the correct location, but for some reason, even after clickonce cleans up the earlier versions and deletes the previous application's data from disk, the mapping data and images are left behind in the folders still, and as the mapping data is about 800mb, id really like for that data to be cleaned up too or it will be adding 800mb of extra data everytime a new version is downloaded.
the files themselves are set to "Content" in the build action property if that makes any difference to how clickonce handles its cleanup processes.
Thanks
Upvotes: 8
Views: 278
Reputation: 21684
Is it possible that these files were included manually (as 'include' or 'data file') under Project Properties > Publish > Application Files?
Upvotes: 2
Reputation: 1749
Why do you not include the images in a ZIP file and store the ZIP file in a resources file of the solution?
When the app starts-up, it unzips the ZIP images file (only the first time) in a user chosen subdirectory and then the apps uses the images. You'll decide when update or remove the images.
I use this strategy for every external content that I want to manage: Java applications that I want to call via Process, or Big Data.
Managing 800 MB of images through Cick once contents couldn't be the right choice!
Upvotes: 0