开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜