How to disable the integration of app.config into the .net library (dll)

When I compile the library, all the settings in Settings.Settings are built into the DLL. how to prevent it?

+4
source share
3 answers

Review the properties of the Settings.settings file and set the option "Create an action for the resource", "Copy to output directory" to "Do not copy".

This should create a dll.config file where you can edit the settings outside the building.

+3
source

You do not have the settings listed in the Settings section. If you do not want to be sent to the dll, then they are not needed. If you have them, then you need them for something, and in this case it makes no sense not to include them.

0
source

If you do not want to set values, make sure you have app.config with deployment values โ€‹โ€‹(empty, 0 or something else). Values โ€‹โ€‹will be compiled into the DLL as default values.

0
source

Source: https://habr.com/ru/post/1335238/


All Articles