2013-03-07 5 views
2

여러 웹 응용 프로그램간에 공유하고 싶은 appSettings가 있습니다. 그래서 내 솔루션의 루트 레벨에서 "Common ConfigSettings"라는 폴더를 만들었습니다. 여기에 내가 공유 모든 일반적인 appSettings 있습니다. 그런 다음 다른 웹 프로젝트에, 내가 디버깅하는 동안이 잘 작동web.config transforms - appSettings 노드가 변환되지 않습니다

<appSettings file="../../Common ConfigSettings/sharedAppSettings.config"> 

..이 파일에 대한 링크를 추가하고 같은 일반적인 설정을 참조합니다. 이제 게시해야 할 때 "연결된"파일이 관련 웹 프로젝트의 디렉토리에 복사되므로 파일 경로가 이제는 web.config 프로젝트와 동일한 디렉토리를 가리 키도록 변경해야합니다. 하지만 나는 일할 변형을 얻을 수 없습니다.

내 web.Config의 appSettings에서 "file"속성을 변환하려고합니다. 하지만 이드는 제대로 작동하지 않는 것 같습니다.

원래의 Web.config

<appSettings file="../../Common ConfigSettings/sharedAppSettings.config"> 
</appSettings> 

<appSettings file="sharedAppSettings.config" xdt:Transform="SetAttributes(file)" 
</appSettings> 

변환 한 후 내가 클릭하면 미리보기가 변환

<appSettings file="../../Common ConfigSettings/sharedAppSettings.config"> 
</appSettings> 
+0

변환 : 그냥 XDT에서 "(파일)"를 제거 . – abatishchev

답변

4

이동 이 지금 일하고있어. , 귀하의 질문에 의미있는 설명 제목을 부여하십시오

변환

<appSettings file="sharedAppSettings.config" xdt:Transform="SetAttributes"> 
</appSettings> 

결과

<appSettings file="sharedAppSettings.config"> 
</appSettings> 

감사

+0

살펴보면 xdt : Locator를 추가했지만 xdt : Transform도 추가하는 것을 잊어 버렸습니다. 와우 : –