Putting configuration information in a DLL

前端 未结 4 972
轮回少年
轮回少年 2020-12-06 02:38

In my project I have functionality that is being used as a web application and as a console application (to be started from the task scheduler). To do that I put the common

4条回答
  •  执念已碎
    2020-12-06 03:14

    Yes, you can and should put the common configuration settings in the config file for your DLL. Just add an app.config file to the DLL project, and make sure you read the configuration settings from inside the DLL. When deployed, your config file needs to have the name "MyDLL.dll.config" (assuming your DLL is named "MyDLL.dll") and be in the same folder as the DLL.

提交回复
热议问题