Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a "ZIP project" in Visual Studio? [closed]

In Visual Studio there are several "Setup and Deployment" projects, one of these is "CAB Project".

http://i55.tinypic.com/21cxaoi.png

But I actually want a simple "ZIP Project" which enables me to add some folders + dll's from my solution and package this all in a zip file for easy distribution on the web.

  • Is there such a project type ?

  • When I want to create this by myself, what resources and references should I use to build this ?

Edit
@Cheeso
I created a dummy 'class library' project which has dependencies on all the sub projects. In this dummy project I used the post-build event to zip the dll's using 7-zip. But I was hoping that there was a better solution for this.

like image 459
Stef Heyenrath Avatar asked Jan 25 '11 14:01

Stef Heyenrath


2 Answers

The MSBuild Extension Pack offers some compression tasks you could use.

For example, edit your project file, uncommenting the 'AfterBuild' target and including an appropriate compression task that packages up the content you want.

<Project>
  ...
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  -->
  <Target Name="AfterBuild">
    <ItemGroup>
      <!-- Set the collection of files to Zip-->
      <FilesToZip Include="C:\YourContent\*"/>
    </ItemGroup>

    <MSBuild.ExtensionPack.Compression.DNZip TaskAction="Create" CompressFiles="@(FilesToZip)" ZipFileName="C:\YourZipFile.zip"/>
  </Target>
</Project>
like image 87
Ergwun Avatar answered Sep 28 '22 05:09

Ergwun


If I understand what you're after, a quick-and-easy solution might be to write a powershell or Javascript script, or a batch file, that runs as a post-build event.
You'll need a zip library, probably. DotNetZip works.

like image 25
Cheeso Avatar answered Sep 28 '22 04:09

Cheeso