Sunday 24 March 2019

c# - How to merge app.config into web.config on build

Are there any tools or extensions for Visual Studio that will enable merging a app.config file into the final web.config file for web applications? Also please give an example of how to use the tool to solve the below scenario.




My scenario:
I have one or more class libraries, each with its own app.config file.
One or more class libraries are added to many different web application projects, each with its own web.config file.



Instead of manually having to copy/paste app.config configuration into each web.config I would like to have a build script, tool or Visual Studio extension handle the merging (transform).

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...