开发者

Is there any way to inherit settings in the .config file from a subassembly?

开发者 https://www.devze.com 2023-02-05 04:16 出处:网络
Is there any way to inherit settings in the .config file from a subassembly? Example: Imagine I have an assembly .NET that does something like connect to a database, or a remote WCF service. This a

Is there any way to inherit settings in the .config file from a subassembly?

Example:

  • Imagine I have an assembly .NET that does something like connect to a database, or a remote WCF service. This assembly is called "Connect.dll", and its config file is "Connect.dll.config".
  • This sub assembly is called from the main program, "main.exe", its config file is "main.exe.config".
  • Is there some way to import the settings from "connect.dll.config" into "main.config", without having to copy the appropriate .xm开发者_开发技巧l lines in in by hand?


Unfortunately, no. There is however possible to load configuration from the "Connect.dll.config" manually using the ConfigurationManager API.

0

精彩评论

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