Reputation: 7212
My clickonce App has an .ini file(config from a 3 party dll) that must be included on app root directory. I added the file as link and mark as "content" and "copy if newer". The problem is that every time that I deploy an update, clickonce download the file again overwriting all changes.
Why clickonce is not respecting "copy if newer
" ?
Upvotes: 0
Views: 866
Reputation: 141638
Why clickonce is not respecting "copy if newer" ?
Because that's used by the compiler when copying to the bin (or where ever the binaries are compiled to). This setting has nothing to do with clickonce.
I would recommend renaming your INI to "base.ini", or some equivalent. When your application starts, copy it to a new file with the new name if, and only if, it doesn't exist already. Something like this:
if (!File.Exists("yourinifile.ini"))
{
File.Copy("base.ini", "yourinifile.ini");
}
EDIT:
You may be able to mark your file as a data file in your ClickOnce manifest. To do this,
Upvotes: 1