Question on upgrade process and over writing config files
Hi,
when you run an upgrade the readme says:
"When upgrading your website using NuGet you should answer "No" to the questions to overwrite the Web.config
file (and config files in the config folder)."
However, this doesn't make sense as the upgrades use different assemblies.
Also I just upgraded from 7.3 to 7.4 and said overwrite web.config and for example it added
Also it retained the connection string.
So what is the proper way to do this, as overwriting the web.config seems to work even though the readme says dont overwrite it?
I'm not really sure what's the best way of doing, but I usually let the upgrade overwrite the configs then use the difftool before committing to restore whatever settings I had. Would be interested if there's a better way.
The Nuget upgrade instructions for Umbraco (located here:https://our.umbraco.org/documentation/Getting-Started/Setup/Upgrading/general#are-you-using-nuget) state that you shouldn't override the config files.
The other packages that come with Umbraco can, however, result in updates to some files. So thinks like assembly bindings will get updated in your web.config file where appropriate. Irritatingly, this can result in the order of entries in your web.config moving around making diff's a little frustrating at times, but this isn't generally caused by Umbraco.
It is best to double check your critical settings if files do change, but generally you should be okay.
Like Nik says - even if you say "no" to overwriting all files, essential changes to web.config are still made. So your connection string and any new assembly bindings etc. are still added. What won't be touched are all the files in /config/
The way I always do it is:
Download the zip of Umbraco I'm going to upgrade (for later reference)
Perform the actual upgraded using Nuget but say "no" to overwrites
Use a diff tool to compare all .config files and merge in any required changes
Even files in /config get touched though, if we have a install.xdt file for them, they will be updated so they work with the version you're upgrading to.
If you choose to overwrite, then all that updating gets skipped and you just get the latest version which might (and sometimes definitely WILL) break your site.
Question on upgrade process and over writing config files
Hi,
when you run an upgrade the readme says:
"When upgrading your website using NuGet you should answer "No" to the questions to overwrite the Web.config file (and config files in the config folder)."
However, this doesn't make sense as the upgrades use different assemblies. Also I just upgraded from 7.3 to 7.4 and said overwrite web.config and for example it added Also it retained the connection string.
So what is the proper way to do this, as overwriting the web.config seems to work even though the readme says dont overwrite it?
Thanks!
Hello,
I'm not really sure what's the best way of doing, but I usually let the upgrade overwrite the configs then use the difftool before committing to restore whatever settings I had. Would be interested if there's a better way.
Regards, Magnus
Don't overwrite them please. We run config transforms for you so you will be in a workable state after the upgrades.
HI Damon,
The Nuget upgrade instructions for Umbraco (located here:https://our.umbraco.org/documentation/Getting-Started/Setup/Upgrading/general#are-you-using-nuget) state that you shouldn't override the config files.
The other packages that come with Umbraco can, however, result in updates to some files. So thinks like assembly bindings will get updated in your web.config file where appropriate. Irritatingly, this can result in the order of entries in your web.config moving around making diff's a little frustrating at times, but this isn't generally caused by Umbraco.
It is best to double check your critical settings if files do change, but generally you should be okay.
Thanks,
Nik
Like Nik says - even if you say "no" to overwriting all files, essential changes to
web.config
are still made. So your connection string and any new assembly bindings etc. are still added. What won't be touched are all the files in/config/
The way I always do it is:
Even files in
/config
get touched though, if we have ainstall.xdt
file for them, they will be updated so they work with the version you're upgrading to.If you choose to overwrite, then all that updating gets skipped and you just get the latest version which might (and sometimes definitely WILL) break your site.
The xdt files in this folder will make sure the appropriate changes are made to any config file we think needs updating: https://github.com/umbraco/Umbraco-CMS/tree/dev-v7/build/NuSpecs/tools
is working on a reply...