Web application packaging and deployment automation using MSBuild needs the following steps:
Step 0. Server preparation is covered here How to prepare a Windows Server 2012 for web deployment
- Configure solution build profiles
- Configure transformation of web.config file
- Configure publishing profiles
- Create a web deployment package with MSBuild script
- Run deployment from command line
Sample solution that includes build script and configured publishing profiles can be downloaded here https://github.com/mchudinov/BuildWebDeployPackage
Here is a list of steps for preparation of a Windows Server 2012 for deployment of web packages or deployment from Visual Studio.
- Activate Web server role
- Install Web Deploy
- Open network ports
- Create an account for deployment
- Create web sites
- Configure deployment for sites
This post is about how to package .NET application for Windows into an MSI (MicroSoft Installer) package using Wix# tool in command line. Packaging process can be easily automated on continues integration server.
Generally application building workflow is simple:
- Assign a version number to an assembly
- Build binaries
- Copy binaries to package folder and build msi-package with the same version as assembly
Build process will be controlled by MSBuild project file and can be started from a continues integrations server.
Sample solution is available for download here https://github.com/mchudinov/PackagingMSI. Solution is compatible with Visual Studio 2013.
Automated building and versioning processes were described in my previous posts: