2011-02-02 13 views
8

CruiseControl.netのビルドアンドデプロイスクリプトで_WPPCopyWebApplication MSBuildターゲットを使用していますが、このターゲットは展開前にプロジェクトの一部ではないファイルを、App_Dataファイル(このアプリケーションでは、アップロードされた画像などが含まれます)。MSBuild _WPPCopyWebApplicationターゲットのクリーニングを停止する方法App_Dataフォルダ

From 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> 

これはVS2010ソリューションからのものですが、CC.Netで作成されていますが、私は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のプロパティのリストを見つけることができます知っていますか? –

関連する問題