Is there a "ZIP project" in Visual Studio?

Visual Studio has several Installation and Deployment projects, one of which is the CAB Project .

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

But I really want a simple “zip project” that allows me to add some + dll folders from my solution and pack it all into a zip file to make it easier to distribute on the Internet.

  • Is there such a type of project?

  • When I want to create it myself, what resources and links should I use to create it?

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

+4
source share
3 answers

The MSBuild Extension Pack offers several compression tasks you can use.

For example, edit the project file by uncommenting the AfterBuild target and including the appropriate compression task that packs 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> 
+4
source

If I understand what you need, a quick and easy solution could be to write a powershell or Javascript script file or a batch file that fires as an event after the build.
You will probably need a zip library. DotNetZip works.

+1
source

There is a (poorly selling) DPack feature called Solution Backup that will create a zip file for your solution from visual studio.

It is free and painless to install.

0
source

Source: https://habr.com/ru/post/1336992/


All Articles