3.0 to 3.1 Config migration?

Topics: General discussion
Jun 8, 2007 at 6:46 PM
After uninstalling 3.0 and installing 3.1, I find suddenly all my 3.0 (App|Web).config files are broken (cannot be used by the GUI config tool), due to the config files specifying strong named assemblies (pointing to 3.0 in the config files).

Do I have to manually update all my config files when moving from 3.0 to 3.1, or is there some sort provided migration tool that automatically switches the references from 3.0 to 3.1 in a config file?

This should at least be mentioned somewhere - I didn't see it in the release notes. Strictly speaking, the 3.1 config tool is not backwards compatible to existing 3.0 config files?
Jun 8, 2007 at 7:34 PM
Edited Jun 8, 2007 at 7:35 PM
My workaround:

  • Open the config file in Visual Studio
  • Do a regex search and replace
    • search: Version=3\.0\.0\.0.*PublicKey.*"
    • replace: Version="
  • Save the config file
  • Reopen it in the EntLib GUI, make a change; when you save it rebrands the file with the strong named assemblies automatically.
Jun 9, 2007 at 3:17 PM
Good workaround.

Unfortunately, you do have to manually modify your configuration files when moving between different versions. A good copy and paste can definitely save you some effort.




David Hayden
Microsoft MVP C#
Jun 11, 2007 at 4:38 AM
I have a set of Powershell scripts that I used when we updated the version number in the Entlib source code. You think you had it bad? There's over 450 references to the entlib version numbers in the various config files in the entlib source code. It was particularly fun because a simple search and replace for Version= will also replace references to things like WCF.

Unfortunately, the scripts are on my work machine. I'll try to post them tomorrow.