This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- XML files are not overwritten during upgrade
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 14, 2012
05:54 AM
XML files are not overwritten during upgrade
Hi,
I am facing issue where non-versioned xml files are not updated during upgrade and still remains as base installer file.
Similarly we have text file and other xml files in our package. All the files are non versioned files, I guess overwrite issue will be occurs with other files too.
How to rectify this problem? Also I want to know how versioning can be done for xml and text files.
Any suggestion please?
I am facing issue where non-versioned xml files are not updated during upgrade and still remains as base installer file.
Similarly we have text file and other xml files in our package. All the files are non versioned files, I guess overwrite issue will be occurs with other files too.
How to rectify this problem? Also I want to know how versioning can be done for xml and text files.
Any suggestion please?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 14, 2012
07:27 AM
There is no need to version an XML file when you install it.
It is by definition a resource file which is not meant to be versioned.
Nevertheless, there is a way to achieve that: You could pack such resources in a DLL, and give this DLL a version number. Consequently, you would no longer be able to apply XML file changes to it.
Now if you want the XML file to get overwritten whatever it contains, you can set the corresponding file to "Always Overwrite", which will artificially give it a very high version number (65535.0.0.0).
Finally, are you applying any XML file change to this file?
And what sort of upgrade are you trying to perform? What project type are you working on?
If you are trying to do a "minor upgrade" with a Basic or InstallScript MSI project, you should stop straight away and go for a "major upgrade" which will save you lots of troubles later.
It is by definition a resource file which is not meant to be versioned.
Nevertheless, there is a way to achieve that: You could pack such resources in a DLL, and give this DLL a version number. Consequently, you would no longer be able to apply XML file changes to it.
Now if you want the XML file to get overwritten whatever it contains, you can set the corresponding file to "Always Overwrite", which will artificially give it a very high version number (65535.0.0.0).
Finally, are you applying any XML file change to this file?
And what sort of upgrade are you trying to perform? What project type are you working on?
If you are trying to do a "minor upgrade" with a Basic or InstallScript MSI project, you should stop straight away and go for a "major upgrade" which will save you lots of troubles later.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Feb 14, 2012
07:46 AM
You need to understand that the way MSI treats non-versioned files is incompatible with XML files. The rules for evaluating the key files of components are:
Creation Date != Modification date == user data, no overwrite or uninstall
Src File has Version and Dst File Does Not == always overwrite
The problem is that XML files are not an atomic resource like a DLL, Help File or Registry key. They are a complex delta where you really need to preserve changes from the base and merge them back into the new base.
It takes a bit of design and plumbing to do this. A simple always overwrite is frequently not good enough.
Creation Date != Modification date == user data, no overwrite or uninstall
Src File has Version and Dst File Does Not == always overwrite
The problem is that XML files are not an atomic resource like a DLL, Help File or Registry key. They are a complex delta where you really need to preserve changes from the base and merge them back into the new base.
It takes a bit of design and plumbing to do this. A simple always overwrite is frequently not good enough.