Tôi đang sử dụng mục tiêu MSBuild _WPPCopyWebApplication MSBuild trong kịch bản xây dựng và triển khai CruiseControl.net, nhưng dường như mục tiêu này làm sạch tệp không phải là một phần của dự án trước khi triển khai - cụ thể , Tệp App_Data (dành cho ứng dụng này, bao gồm hình ảnh đã tải lên, v.v.).Làm thế nào để ngăn chặn MSBuild _WPPCopyWebApplication mục tiêu làm sạch thư mục App_Data
Từ Microsoft.Web.Publishing.targets;
<OnBefore_WPPCopyWebApplication>
$(OnBefore_WPPCopyWebApplication);
CleanWebProjectOutputDir;
PipelineTransformPhase;
</OnBefore_WPPCopyWebApplication>
Làm cách nào tôi có thể dừng nó làm CleanWebProjectOutputDir, cho mục tiêu này;
<Target Name="Deploy" DependsOnTargets="Tests">
<MSBuild Projects="$(TargetPath)Website.csproj" Properties="Configuration=Debug;WebProjectOutputDir=\\servername\share;Outdir=$(ProjectDir)bin\;" Targets="ResolveReferences;_WPPCopyWebApplication" />
</Target>
Đây là giải pháp VS2010, mặc dù được xây dựng theo CC.Net; Tôi nhận thức được MSDeploy, nhưng không có đầu của tôi xung quanh đó hoàn toàn được nêu ra, vì vậy sẽ thích gắn bó với MSBuild/_WPPCopyWebApplication cho bây giờ.
EDIT:
Tôi đã thu hẹp hơn nữa phần này của mục tiêu;
<!-- 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)" />
Vì vậy, tôi đoán câu hỏi trở nên, làm thế nào tôi có thể đàn áp nhiệm vụ Xóa cụ thể này, hoặc ít nhất là thêm App_Data ** để loại trừ _AllExtraFilesUnderProjectOuputFolder?
Chúa ơi, tôi đã tìm kiếm khách sạn này cho các lứa tuổi, bạn có biết nơi tôi có thể tìm thấy danh sách các thuộc tính msbuild? –