开发者

How to check where .NET ConfigurationManager is looking for a .config file?

I'm building a plugin assembly and I would like to provide an accompanying config file.

Deployed assembly is probably copied somewhere, don't know wher开发者_开发技巧e, and would like to know where does the ConfigurationManager looks for a .config file. I do not wish to load .config from an explicit location, just put it where it is being looked for.


It is pretty simple: it looks in the directory where the .exe is stored for an appname.exe.config file. That makes it unsuitable for your intended use.


you can use procmon from sysinternals to monitor file activity and see where it tries to open the file.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜