|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
when serializing XML, how to NOT save type's fullnameSettings class that's XmlSerializable. <xmlSerializerSection type="MyApp.MyAppSettings, MyApp"> <MyAppSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- some settings... --> </MyAppSettings > </xmlSerializerSection> Using June 2005 Enterprise Library's ConfigurationManager.WriteConfiguration, I save user changes to the settings. However, it serializes the settings with the fullname of the type: <xmlSerializerSection type="MyApp.MyAppSettings, MyApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1234567890ABCDEF"> <MyAppSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <!-- some settings... --> </MyAppSettings > </xmlSerializerSection> This is problematic when I roll out updates to the application. When I roll out version 1.0.1.0 of the application, ConfigurationManager.GetConfiguration() fails because the user's xml settings refer back to 1.0.0.0. If the xmlSerializerSection's type contains only the type name and assembly, everything works great (i.e., it loads the type from 1.0.1.0). Binding redirect from 1.0.0.0 to 1.0.1.0 doesn't seem to work. I have the following options: 1. Don't make the application strongnamed. 2. Keeps the settings class in a seperate assembly. I'm not crazy about either options. When serializing xml, is it possible not to save the type's fullname? thanks in advance. JT |
|||||||||||||||||||||||