2011-02-02 8 views
8

मैं क्रूज़ कंट्रोल.net बिल्ड-एंड-तैनाती स्क्रिप्ट में _WPPCopyWebApplication MSBuild लक्ष्य का उपयोग कर रहा हूं, लेकिन ऐसा लगता है कि यह लक्ष्य फ़ाइलों को साफ़ करता है, जो कि तैनाती से पहले प्रोजेक्ट का हिस्सा नहीं है - विशेष रूप से , App_Data फ़ाइलें (जो इस ऐप के लिए अपलोड की गई छवियां इत्यादि शामिल हैं)।MSBuild _WPPCopyWebApplication लक्ष्य सफाई को रोकने के लिए कैसे करें App_Data फ़ोल्डर

माइक्रोसॉफ्ट.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> 

यह वीएस -2010 समाधान से है, यद्यपि CC.Net के तहत बनाया गया है; मुझे एमएसडी नियोजन के बारे में पता है, लेकिन मेरे सिर को पूरी तरह से अभी तक नहीं मिला है, इसलिए अब के लिए एमएसबिल्ड/_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)" /> 

तो मुझे लगता है कि प्रश्न बन जाता है, मैं कैसे इस विशिष्ट हटाएं कार्य दबाने सकते, या कम से कम _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 गुण सूची कहां मिल सकते हैं? –

संबंधित मुद्दे