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 ?
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.
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. ;)