开发者

I need an app.config file to be used by an assembly at assembly initialization

How do I ensure that an app.config file 开发者_运维百科gets read on assembly initialization, for .Net 3.5-4 ?

It's a class library assembly. VS2008 provides a menu to add an app.config file, but it's ignored so far.

I need to use the app.config to provide information for logging from the assembly.

Thanks in advance!


A config file will only be read by an executable, not a dll.

You need to add the config to the executable that will use your dll.

If you have a test harness (Console app, nUnit test or anything like that), add the required configuration to it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜