I'm confused about best practices to use when deploying and maintaining .NET *.config files via MSI. Our app uses the UnityContainer to manage type injection and type configuration, some of which is environmental, meaning type config changes at each customer site. This Unity configuration is stored in a *.config file along with SQL connections, WCF bindings, and other static environmental information.
We almost always have to update the config with new Unity type mappings added for each new release as the software grows. There is a significant amount of configuration required during an install, so we want to permanently persist the config on the machine even if the software is uninstalled. Our install techs have had to uninstall the software before an update to the next version could be applied, so the MSI package needs to anticipate this scenario. I'm trying to build a WiX installer that gracefully handles all these requirements without breaking all the benefits that MSI brings to the table, like using custom actions to work around challenges I'm having. I would also like to take advantage of any best practices others have established as appropriate. At this point, I have a working MSI with the exception of this one config file. Here's my idea of the dream config handling: 1) Initial install copies the *.config file 2) Config is updated with appropriate environmental settings 3) Install ensures this file is permanent and will not be removed by uninstalling. 4) During a software update, settings are harvested from this file 5) The *.config included in the update package is copied over the old version 6) The new config file is updated with settings harvested from the prior *.config version. This file does not make a good candidate for bundling in a component with another file (KeyPath="no"), since there is no other artifact I want left behind during uninstall. I'm simply lost trying to get there. I've tried multiple ideas and all have fallen flat, currently I have Permanent = "yes" on the config's component, which allows the file to be copied and updated with settings during initial install, but further release updates do not copy in the new config file included in the package. How do I get there? Or if these are unreasonable expectations, then what changes should I make to my installer or our application to accomplish these goals? Thanks for any input! RMartin ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users