M-am tot uitat in ultimul timp la MSBUILD
Interesant si extensibil…
Din fericire , exista o sumedenie de taskuri msbuild cu care poti face (aproape) tot ceea ce vrei
Ceea ce vroiam sa fac era doar o zip-uire a solutiei la fiecare compilare.
La http://msbuildtasks.tigris.org/ am gasit (printre multe altele) task-uri de zip-uit, ca si task de obtinut data si timpul
Asa ca solutia a fost sa le combin … si am reusit sa introduc in proiect asa ceva:
<Target Name=”AfterBuild”>
<Time Format=”yyyyMMdd_HHmmss”>
<Output TaskParameter=”FormattedTime” PropertyName=”FormattedTime” />
</Time>
<ItemGroup>
<ZipFiles Include=”$(SolutionDir)**\*.*” Exclude=”$(SolutionName)*.zip” />
</ItemGroup>
<Zip Files=”@(ZipFiles)” ZipFileName=”$(SolutionName)_$(FormattedTime).zip” />
<MakeDir Directories=”$(SolutionDir)..\Zips” ></MakeDir>
<Move SourceFiles=”$(SolutionName)_$(FormattedTime).zip” DestinationFolder=”$(SolutionDir)..\Zips”></Move>
</Target>
Practic, daca aveti o structura in care solutia(.sln) este intr-un folder , iar celelalte proiecte sunt in sub-folder-e dedesubtul solutiei, adaugati in care proiect vreti codul de mai sus si va aparea , dupa fiecare compilare, un folder zips cu solutia si subfolder-ele zip-uite…
Incerc sa fac o enumerare rapida de task-uri MSBuild, in ideea ca poate cautati ceva si nu vreti sa reinventati roata:
http://www.code
Download details: Microsoft® Visual Studio Team System 2008 Database Edition Power Tools
http://www.micr
Peli’s Farm – TaskSchema, a XSD schema generator for MsBuild tasks
http://blog.dot
NCover Documentation
MSBuild Tasks for BizTalk Continuous Integration
http://geekswit
The custom MSBuild task cookbook – B# .NET Blog
http://bartdesm
How to create a YUI Compressor MSBuild Task – Nick Berardi’s Coder Journal
http://www.code
CodeProject: Custom MSBuild Tasks: Automated Report and DB Deployment. Free source code and
http://www.code
How to Write a Custom MSBuild Task : Keyvan Nayyeri
http://nayyeri.
Brennan’s Blog » Blog Archive » SubSonic and Automation with MSBuild
http://brennan.
msbuildtasks.tigris.org
Sedodream MSBuild Project – Home
http://www.code