开发者

How do I prevent the app.config from being integrated into a .net Library (dll)

开发者 https://www.devze.com 2023-02-04 13:37 出处:网络
When I compile the library, all the settings in Settings开发者_开发百科.Settings are integrated into the 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消