Mark Gillard
Programmer.Gamer.

VSDeployer

VSDeployer logo

A command-line utility for automatically packaging compiled Visual Studio projects into ZIP files for rapid deployment.

Download

Installation and Basic Usage

  1. Download Info-ZIP's command-line zip.exe: [32-bit] [64-bit]
  2. Place vsdeploy.exe and zip.exe in your Windows directory (or anywhere on the system PATH).
  3. Add an environment variable called VSDEPLOY_OUTPUT, and set it to the full path of where you'd like to place completed zips (omit the trailing slash).
  4. For any project you'd like to auto-deploy, open its build events (Project » [Project Name] Properties » Build Events) and add the following to the post-build event command line:
    vsdeploy -bin "$(TargetDir)\" -zip "$(VSDEPLOY_OUTPUT)" -target $(TargetFileName)
  5. Optional: set Run the post-build event to When the build updates the project output.
  6. Build your project.

Command Line Parameters

vsdeploy /bin binpath /zip zippath /target exename [/name appname] [/exclude exmask ...] [/include inmask ...]

binpath Bin directory of the visual studio project.
zippath Directory in which to store output zip file.
exename Filename of your project's main DLL or EXE file.
appname Name used to generate the zip file's name (will use executable name if omitted).
exmask Mask of files to exclude (/exclude can be used more than once).
inmask Mask of files to include (/include can be used more than once).

Exit Error Codes

1: The path provided for your project's output bin/ directory was invalid, missing, or the directory does not exist.

2: The path provided for the zip output directory was invalid or missing.

3: The filename provided for your project's main .exe/.dll was invalid or missing.

4: Version information could not be extracted from project's main .exe/.dll file.

5: There was an error searching for old versions of the output zip. This likely means you do not have permission to access the zip output directory (try running as administrator).

6: There was an error deleting an old version of the output zip. This likely means you do not have permission to access the zip output directory (try running as administrator).

7: The zip output directory did not exist and there was an error creating it. This likely means you do not have permission to access the zip output directory (try running as administrator).

8: You did not provide enough arguments.

9: You ran the executable with the /? switch, triggering usage-output-only mode.

1000+: If you receive an exit code of 1000 or greater, this is because vsdeploy.exe has processed all arguments without issue but zip.exe has returned an error. The specific error number returned is (zip.exe's error code) + 1000. Thus, an exit code of 1004 means that zip.exe returned 4. For a full list of zip.exe's error codes, see this page.