小编Rom*_*anT的帖子

将app.config的一部分移动到单独的文件中

为了方便我的应用程序,我需要在单独的文件中使用app.config的"runtime"元素.

试过像

<runtime file="runtime.conf" />
Run Code Online (Sandbox Code Playgroud)

并且

<runtime configFile="runtime.conf" />
Run Code Online (Sandbox Code Playgroud)

在runtime.conf我有:

<runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">  
            .......
    </assemblyBinding>
</runtime>
Run Code Online (Sandbox Code Playgroud)

但它被忽略了......

有没有办法找出问题所在.

当然,当我将运行时部分直接复制到app.config时,它可以工作.

我在某个地方发现,当使用configFile ="..."时,包含的文件必须放在子目录中.试了但是它也行不通......

似乎包括不适用于运行时部分.

.net configuration app-config

7
推荐指数
1
解决办法
1751
查看次数

标签 统计

.net ×1

app-config ×1

configuration ×1