How do I prevent the app.config from being integrated into a .net Library (dll)
When I compile the library, all the settings in Settings开发者_开发百科.Settings are integrated into the DLL. how do I prevent this?
View the properties of the Settings.settings file and set the Build Action to Resource, Copy to Output Directory to Do Not Copy.
This should create you a dll.config file where you can edit the settings outside of building.
Don't have any settings listed in Settings.Settings. If you don't want them being shipped out in the dll, then don't have them. If you have them, then you must need them for something, in which case it makes no sense not to include them.
If you don't want to expose values, make sure you have an app.config with deployment values (empty, 0, or something). The values WILL be compiled into the DLL as default values.
精彩评论