来自库的nuget包拆分配置

时间:2017-02-14 04:42:24

标签: dll package nuget config nuget-package

将库配置设置文件分解到单独的包中是否有任何优势?

假设我们打包了一个lib + config,然后更新它:

[Tue Feb 14 01:03:50 2017] [warn] VirtualHost 162.214.21.28:8090 overlaps with VirtualHost 162.214.21.28:8090, the first has precedence, perhaps you need a NameVirtualHost directive
[Tue Feb 14 01:03:50 2017] [warn] VirtualHost 162.214.21.28:8090 overlaps with VirtualHost 162.214.21.28:8090, the first has precedence, perhaps you need a NameVirtualHost directive
[Tue Feb 14 01:03:50 2017] [error] VirtualHost *:8090 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Tue Feb 14 01:03:50 2017] [warn] VirtualHost 162.214.21.28:8090 overlaps with VirtualHost 162.214.21.28:8090, the first has precedence, perhaps you need a NameVirtualHost directive
[Tue Feb 14 01:03:50 2017] [warn] NameVirtualHost 162.214.21.28:80 has no VirtualHosts
[Tue Feb 14 01:03:50 2017] [warn] NameVirtualHost 127.0.0.1:80 has no VirtualHosts

或者,我们可以将dll和xml拆分成单独的包:

MyLibrary.1.0 package
contents : MyLibrary.dll v1.0 + MyConfig.xml (original)

MyLibrary.1.1 package 
contents : MyLibrary.dll v1.1 + MyConfig.xml (revised)

Project A
subscribe MyLibrary.1.0 package ( MyConfig.xml original ) 

Project B 
subscribe MyLibrary.1.1 package ( MyConfig.xml revised ) 

我能看到的唯一优势是,在单独的软件包中配置,可以更新到最新的配置而无需更新到最新的库 - 但它不太可能有用。而且我们失去了lib和相关配置设置的强耦合。

0 个答案:

没有答案