开发者

How to apply a .NET .config file to a running process?

开发者 https://www.devze.com 2022-12-10 13:49 出处:网络
I have a .NET assembly (.dll) that gets loaded as a COM server into an existing process.How can I get a .config file applied to it such that ConfigurationManager.GetSection will returnthe section out开

I have a .NET assembly (.dll) that gets loaded as a COM server into an existing process. How can I get a .config file applied to it such that ConfigurationManager.GetSection will return the section out开发者_JAVA技巧 of the applied .config file?


You'll want to use ConfigurationManager.OpenMappedExeConfiguration. There's good code samples in the link, so I won't copy them here.

0

精彩评论

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