2011-02-02 3 views
8

CruiseControl.net 빌드 및 배포 스크립트에서 _WPPCopyWebApplication MSBuild 대상을 사용하고 있지만이 대상은 배포 전에 프로젝트의 일부가 아닌 파일을 정리하는 것처럼 보입니다 , App_Data 파일 (이 응용 프로그램에는 업로드 된 이미지 등이 포함됩니다).MSBuild _WPPCopyWebApplication 대상 청소를 중지하는 방법 App_Data 폴더

보낸 사람 Microsoft.Web.Publishing.targets;

<OnBefore_WPPCopyWebApplication> 
    $(OnBefore_WPPCopyWebApplication); 
    CleanWebProjectOutputDir; 
    PipelineTransformPhase; 
</OnBefore_WPPCopyWebApplication> 

어떻게하면이 대상에서 CleanWebProjectOutputDir을 중지 할 수 있습니까?

<Target Name="Deploy" DependsOnTargets="Tests"> 
    <MSBuild Projects="$(TargetPath)Website.csproj" Properties="Configuration=Debug;WebProjectOutputDir=\\servername\share;Outdir=$(ProjectDir)bin\;" Targets="ResolveReferences;_WPPCopyWebApplication" /> 
</Target> 

이것은 CC.Net에서 작성되었지만 VS2010 솔루션에서 가져온 것입니다. 나는 MSDeploy에 대해 알고 있지만, 아직 완전히 그 주위에 머리를 가지고 있지 않다. 그래서 지금은 MSBuild/_WPPCopyWebApplication을 고집하는 것을 선호 할 것이다.

편집 : 나는 더 목표의이 부분이 좁혀했습니다

;

<!-- In the case of the incremental Packaging/Publish, we need to find out the extra file and delee them--> 
<ItemGroup> 
    <_AllExtraFilesUnderProjectOuputFolder Include="$(WebProjectOutputDir)\**" /> 
    <_AllExtraFilesUnderProjectOuputFolder Remove="@(FilesForPackagingFromProject->'$(WebProjectOutputDir)\%(DestinationRelativePath)')" /> 
</ItemGroup> 
<!--Remove all extra files in the temp folder that's not in the @(FilesForPackagingFromProject--> 
<Delete Files="@(_AllExtraFilesUnderProjectOuputFolder)" /> 

그래서 나는이 특정 삭제 작업을 supress 수있는 방법, 문제가 될 것 같아요, 또는 적어도 _AllExtraFilesUnderProjectOuputFolder 제외에 ** App_Data를 추가?

답변

9

당신의 재산에 CleanWebProjectOutputDir=False을 추가

<Target Name="Deploy" DependsOnTargets="Tests"> 
    <MSBuild Projects="$(TargetPath)Website.csproj" Properties="Configuration=Debug;CleanWebProjectOutputDir=False;WebProjectOutputDir=\\servername\share;Outdir=$(ProjectDir)bin\;" Targets="ResolveReferences;_WPPCopyWebApplication" /> 
</Target> 
+1

나의 하나님, 내가 연령대이 부동산에 대한 찾고 있었어요, 당신은 어디 msbuild를 속성 목록을 찾을 수 있습니다 알 수 있습니까? –

관련 문제