This repo is a collection of tools for deploying software on windows.
The entire chain looks like this.
- Build your software
- Use the BuildCopyUtility to combine the files into a deployable directory structure
- Use the ConnectionStringUtility to replace the connection strings for production
- Use the ConsolePackager to package this directory into a minified zip file
- Update your database using FluentDatabase or some other tool
- Transfer the zip file using the FTPClient
- Extract and deploy the zip file using the deployment service which runs on your server
I combine these different actions using a powershell script I run from Visual Studio to have a one click build and deploy.
To use the projects I suggest
- Building these projects as nuget packages using the BuildNugetPackages.bat
- Creating a nuget package source in Visual Studio and pointing it to the nuget output
- Adding a reference to these packages in your solution.
- Creating a powershell script to combine the various pieces to fit your needs referencing the executables in the packages folder in your solution
Library of file copy functions
Command line utility that uses a config file to copy files around.
Opens an xml file and replaces a value. I use it for connection string replacement.
Uses command line arguments to create a minified zip file from a directory
Windows service that runs on a server. It monitors a directory for zip files and then extracts/recombines/moves them to the correct directories.
Library of functionality to create and extract minified zip files
Install-Package Codenesium.PackageManagementLib
As a wrapper for DotNetZip. There is more complex functionality like a manifest packager that isn't documented here yet.
string inputDirectory = "c:\tmp\toZip";
string destinationFileName = @"c:\tmp\test.zip";
string outDirectory = @"c:\tmp\out";
Packager packager = new Packager();
await packager.ZipDirectory(inputDirectory Path.GetDirectoryName(destinationFileName), Path.GetFileName(destinationFileName));
await packager.ZipDirectory(destinationFileName,outDirectory);
Windows form tester for the PackageManagementLib