這裏的這種任務在.wdproj文件的Web部署項目的腳本的例子:
<Target Name="AfterBuild">
<!-- ============================ Script Compression============================ -->
<MakeDir Directories="$(OutputPath)\compressed" />
<Exec Command="java -jar c:\yuicompressor-2.2.5\build\yuicompressor-2.2.5.jar --charset UTF-8 styles.css -o compressed/styles.css" WorkingDirectory="$(OutputPath)" />
<Exec Command="move /Y .\compressed\* .\" WorkingDirectory="$(OutputPath)" />
<RemoveDir Directories="$(OutputPath)\sql" />
<Exec Command="c:\7zip-4.4.2\7za.exe a $(ZipName).zip $(OutputPath)\*" />
</Target>
這將允許你刪除的文件夾。我懷疑如果你不想在的上拷貝文件夾的拷貝,那麼解決方案文件應該是指定的地方,儘管我不需要使用它。)
哇,這比我想象的要容易得多!太好了,謝謝! – MaseBase 2009-02-21 02:11:54