If app.config for a DLL should be in the “main config”… what do we do with WCF References in DLLs?

后端 未结 3 1926
暖寄归人
暖寄归人 2020-12-29 09:59

Ok, this is rather simple, but from what I\'ve seen… you can only use some sort of Windows Workflow to include another config into another (which I refuse to do).

He

3条回答
  •  囚心锁ツ
    2020-12-29 10:22

    You can have a library project include custom config files and those files can be copied to the executable location of another application (it's a little sticky, but not too big a deal). You just have to use OpenMappedExeConfiguration to get to any information in those files. You'd then have to do some custom coding when you instantiate your WCF proxies (instantiate a Binding and pass that to the proxy). I'm late to the party here, but I can provide more details if you're interested.

提交回复
热议问题