【发布时间】:2016-03-13 09:39:47
【问题描述】:
我的 nupkg 中有一些信息想包含在消费者的应用程序中。使用 nupkg 时直接包含部分 app.config 的最佳方式是什么?
我目前已经这样做了:
- mypackage.nupkg
- 内容
- App.config
- 内容
但这使得它想要覆盖用户自己的 App.config,而其中可能包含有价值的信息。
所以我想将我的 App.config 与用户的 App.config 结合起来。
我已经看到了类似这样的内容:C#: manage Multiple App.config files,但我看不出如何强制用户将我的作品包含在其 App.config 中。
我的 App.config 文件的内容:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="somefolder;someotherfolder;" />
</assemblyBinding>
</runtime>
</configuration>
如何强制消费者将我的 App.config 添加到它自己的 app.config 中?
【问题讨论】:
标签: c# nuget app-config