tags:

views:

32

answers:

2

Want a command which gives to create a zip folder to desired destination in msbuild. PLease Help its urgent..

For more clarification of my question :

I have to include this ZIP task in to my build, where ever the developer pulls my code and builds it , how can i include these task into his machine , is there any other way ? is there a way that we can include the Community dll and refer in the msbuild.

THANKS IN ADVANCE ..:)

+1  A: 

THERE'S AN MSBUILD COMMUNITY TASKS PROJECT THAT INCLUDES A ZIP CAPABILITY. http://www.bing.com/search?q=msbuild+community+zip&form=QBRE&qs=n&sk

Cheeso
Hey tx bro , i did that thing first (searching on net). But it doesn't go with my question what I am asking here for.
Malcolm
The MSbuild community tasks add-in does zip files. I don't know exactly what you mean by "a command which gives to create a zip folder", but I was guessing that meant... *a command to create a zip file*. That Zip task I referenced does that. if you want something other than that, maybe you can clarify.
Cheeso
I have to include this ZIP task in to my build, where ever the developer pulled my code and building , how can i include these task into his machine , is there any other way ?is there a way that we can include the Community dll and refere in the msbuild
Malcolm
A: 

Use the Zip task from MSBuild Community Task.

In your project file, add (and adapt) the following code snippet:

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

<PropertyGroup>
  <FolderToZip>C:\Source_folder<FolderToZip>
  <DesiredDestination>C:\Destination_Folder</DesiredDestination>
</PropertyGroup>

<ItemGroup>
  <ZipFiles Include="$(FolderToZip)\**\*.*"/>
</ItemGroup>

<Target Name="Zip">
  <Zip Files="@(ZipFiles)" 
    ZipFileName="$(DesiredDestination)\Archive.zip" />
</Target>
madgnome