2016-12-13 8 views
1

내 web.config에서 기존 appSettings를 업데이트하려고합니다. 나는 전체 가치를 대체하고 싶지는 않지만, 새로운 가치를 끝에 추가합니다. 이것이 가능한가?XDT web.config의 변형이 추가 가능

현재 값 :

<add key="umbracoReservedPaths" value="~/umbraco,~/install/" /> 

필수 값 :

<add key="umbracoReservedPaths" value=",~/signalr" xdt:Transform="SetAttributes(value)" xdt:Locator="Match(key)"/> 

답변

1

당신은 새로운 요소를 삽입하거나 수정할 수 있습니다

<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/signalr" /> 

이것은 내가 내 변환 파일에 현재 가지고있는 것입니다 기존의 XDT 변환은 속성 값을 원본에 추가하는 민첩성이 없습니다. MSDN Web.config supported transformations

삽입 :

<add key="ExampleKey" value="true" 
     xdt:Transform="Insert" /> 

업데이트 value 속성 :

<add key="ExampleKey" value="true" 
     xdt:Transform="SetAttributes(value)" xdt:Locator="Match(key)"/> 

바꾸기 요소 :

<add key="ExampleKey" value="true" 
     xdt:Transform="Replace" xdt:Locator="Match(key)"/>