I use the _WPPCopyWebApplication MSBuild target in creating and deploying the CruiseControl.net script, but it seems that this target clears files that are not part of the project before deployment - in particular, the App_Data files (which the application for this, including downloaded images, etc. )
From Microsoft.Web.Publishing.targets;
<OnBefore_WPPCopyWebApplication> $(OnBefore_WPPCopyWebApplication); CleanWebProjectOutputDir; PipelineTransformPhase; </OnBefore_WPPCopyWebApplication>
How can I stop its execution of CleanWebProjectOutputDir, given this goal,
<Target Name="Deploy" DependsOnTargets="Tests"> <MSBuild Projects="$(TargetPath)Website.csproj" Properties="Configuration=Debug;WebProjectOutputDir=\\servername\share;Outdir=$(ProjectDir)bin\;" Targets="ResolveReferences;_WPPCopyWebApplication" /> </Target>
This solution is VS2010, although it is built under CC.Net; I know MSDeploy, but I donβt know yet how to do this, so now prefer to use MSBuild / _WPPCopyWebApplication.
EDIT:
I have narrowed it down to this part of the goal;
<ItemGroup> <_AllExtraFilesUnderProjectOuputFolder Include="$(WebProjectOutputDir)\**" /> <_AllExtraFilesUnderProjectOuputFolder Remove="@(FilesForPackagingFromProject->'$(WebProjectOutputDir)\%(DestinationRelativePath)')" /> </ItemGroup> <Delete Files="@(_AllExtraFilesUnderProjectOuputFolder)" />
So, I think, the question arises, how can I suppress this particular uninstall task, or at least add App_Data ** to _AllExtraFilesUnderProjectOuputFolder exceptions?
Phild
source share