My Snippets

Creating a Zip package using MsBuild

<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/>

<ItemGroup>
    <MyFiles Include="C:\MyDir\**\*.cs"/>
</ItemGroup>

<MakeDir Directories="D:\MyDir"
    Condition="!Exists('D:\MyDir')" />

<Copy SourceFiles="@(MyFiles)"
    DestinationFolder="D:\MyDir\" />

<Zip Files="@(MyFiles)"
       WorkingDirectory="D:\MyDir\"
       ZipFileName="D:\MyDir\MyFiles.zip"
       ZipLevel="9" />

September 30th, 2009 Posted by | msbuild | no comments

No Comments

No comments yet.

Sorry, the comment form is closed at this time.