No, there's no way to exclude files you're adding using that method. You'll just have to loop over all the files and generate the XML to add the files you want to add.
We are using the command line to generate the updates using something like the following xml:
<?xml version="1.0" encoding="utf-8"?><Versions> <AddVersion> <Version>1.0.0</Version> <Files dir="basedir"> <Folder source="C:\FirstVersion" insideonly="true" /> </Files> </AddVersion> <AddVersion> <Version>1.0.1</Version> <Files dir="basedir"> <Folder source="C:\SecondVersion" insideonly="true" /> </Files> </AddVersion></Versions>
However, our application has a settings.config file that might change inside that folder.What is the best way to exclude that file from the update using the XML?
No, there's no way to exclude files you're adding using that method. You'll just have to loop over all the files and generate the XML to add the files you want to add.
If we want to avoid doing that, can we copy a version of that file to the temp folder, swap the files before the update and swap them again after? If yes, how can we do the copy task using the xml?
No the easier thing to do is just remove the file before running the addfiles XML, then re-add the file to the folder afterward.