2017-01-25 5 views
1

Gibt es eine effiziente Möglichkeit, große Konfigurationen (viele Eigenschaften, die festgelegt werden müssen) für .NET-Projekte zu erstellen? XMLPoke eignet sich hervorragend für eine kleine Anzahl von Änderungen, eignet sich jedoch nicht für große komplexere Projekte mit vielen festzulegenden Eigenschaften.Alternativen zum wiederholten Aufrufen von XMLPoke für Buildkonfigurationen (MSBuild oder NANT)?

Hier ist ein kleiner Auszug aus einem meiner aktuellen Konfigurationsdateien:

[xmlpoke] Found '1' nodes matching XPath expression '/configuration/xyz.com/memcached/servers'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='ServiceName']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='DomainLoaderOptimization']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='MessageQueueProvider']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='DistributedCacheProvider']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='DistributedStateProvider']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='RedisHost']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='RedisHost.Batch']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='XYZService-ServiceUrlPrefix']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='PQRService-ServiceUrlPrefix']/@value'. 
    [xmlpoke] Found '1' nodes matching XPath expression '/appSettings/add[@key='MNBOPUrlPrefix']/@value'. 

Ich will nicht für mehrere Dienste tun dies Dutzende und Dutzende Male gegen configs zu halten.

Ich habe in MSBuild Transformationen untersucht, aber diese scheinen den gesamten Konfigurationsprozess übermäßig kurz zu machen.

Antwort

Verwandte Themen