簡體   English   中英

有什么方法可以從子程序集繼承.config文件中的設置?

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

有什么方法可以從子程序集繼承.config文件中的設置?

例:

  • 想象一下,我有一個程序集.NET,其功能類似於連接數據庫或遠程WCF服務。 該程序集稱為“ Connect.dll”,其配置文件為“ Connect.dll.config”。
  • 從主程序“ main.exe”中調用此子程序集,其配置文件為“ main.exe.config”。
  • 有什么方法可以將設置從“ connect.dll.config”導入到“ main.config”,而無需手動復制相應的.xml行?

抱歉不行。 但是,可以使用ConfigurationManager API從“ Connect.dll.config”手動加載配置。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM