configSource不能在system.serviceModel工作*或*的小节 [英] configSource doesn't work in system.serviceModel *or* its subsections
问题描述
我试图分裂一个app.config文件分割成多个文件,从而可以更方便地管理需要针对不同的环境的差异。由于部分路段很容易...
I'm trying to split an app.config file into multiple files to make it easier to manage the differences needed for different environments. With some sections it was easy...
<system.diagnostics>
various stuff
</system.diagnostics>
成为
<system.diagnostics configSource="ConfigFiles\system.diagnostics.dev" />
与各种各样的东西移动到system.diagnostics.dev文件。
with the "various stuff" moved to the system.diagnostics.dev file.
但对于 system.serviceModel
部分这似乎并没有工作。
But for the system.serviceModel
section this doesn't seem to work.
现在我读过的建议,它并没有为 system.serviceModel
作品本身,但它的部分它的下面:绑定
,客户端
,诊断
等,但同样的事情发生在我身上时,我尝试使用configSource与其中之一。当我把
Now I've read suggestions that it doesn't work for system.serviceModel
itself, but it works for the sections underneath it: bindings
, client
, diagnostics
, etc. But the same thing happens to me when I try to use configSource with one of them. When I put in
<system.serviceModel>
<bindings configSource="ConfigFiles\whateverFile.dev" />
我得到:
的configSource属性没有声明。
有其他人看到了这一点?你知道一个解决方案吗? (也许是我出的最新的架构或东西吗?)
Has anyone else seen this? Do you know a solution? (Perhaps I have an out-of-date schema or something?)
推荐答案
有关配置VS.NET的编辑呻吟,但它的作品。
VS.NET's editor moans about the config, but it works.
我的配置是这样...
I have config like this...
<system.serviceModel>
<behaviors configSource="config\system.servicemodel.behaviors.config" />
<bindings configSource="config\system.servicemodel.bindings.config" />
<client configSource="config\system.servicemodel.client.config" />
</system.serviceModel>
......,工作正常。
... which works fine.
这篇关于configSource不能在system.serviceModel工作*或*的小节的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!