we are upgrading our site from sitecore 8.1 to 9.1. hence like to know how the 9.1 instance web config file can be merged with existing 8.1 web config entries. is this has to be manual or is there any tool available to do that ?
2 Answers
I always recommend to keep the original "web.config" (Web_Unchanged.config) file as it is and do your changes in a different file (Web_Changes.config).
Both files can then be merged into one computed "web.config" file with a build target in the project file:
<Target Name="AfterBuild">
<Exec Command="attrib -r Web.config" />
<!--base transform, adds global settings-->
<TransformXml Source="Web_Unchanged.config" Transform="Web_Changes.config" Destination="Web.config" />
On an update you just have to copy the content of the new version into "Web_Unchanged.config" and you're done!
Note: The "Web.config" file can also be transformed for different environments. ;)
Best regards
Dirk
I do not think we have a tool to compare configs. In our migration also we had to manually compare the web.config entries and then only add the values that you previously had in your 8.1 instance. You could use several text comparison tools like winmerge, Beyondcompare etc to compare the contents of both the files so that you do not accidentally overwrite any of the configurations that are added/ modified in the 9.1 configuration file.
-
-
2I would add that sometimes it is difficult to identify your changes by comparing against 9.1 (there are many changes). You might want to first compare your 8.1 against a clean 8.1 web.config to identify the changes you made specifically for your instance. This will let you know which changes you see in the 9.1 compare are from your changes, and which are from Sitecore version changes. Commented Mar 11, 2020 at 13:26