Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Damon 217 posts 288 karma points
    Jun 20, 2018 @ 11:22
    Damon
    0

    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!

  • Magnus Eriksson 122 posts 362 karma points
    Jun 20, 2018 @ 11:38
    Magnus Eriksson
    1

    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

  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 20, 2018 @ 11:46
    Sebastiaan Janssen
    2

    Don't overwrite them please. We run config transforms for you so you will be in a workable state after the upgrades.

  • Nik 1617 posts 7263 karma points MVP 7x c-trib
    Jun 20, 2018 @ 11:49
    Nik
    1

    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

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jun 20, 2018 @ 12:52
    Dan Diplo
    1

    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:

    1. Download the zip of Umbraco I'm going to upgrade (for later reference)
    2. Perform the actual upgraded using Nuget but say "no" to overwrites
    3. Use a diff tool to compare all .config files and merge in any required changes
  • Sebastiaan Janssen 5060 posts 15522 karma points MVP admin hq
    Jun 20, 2018 @ 12:55
    Sebastiaan Janssen
    3

    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.

    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

Please Sign in or register to post replies

Write your reply to:

Draft