Microsoft Build Engine

Microsoft Build Engine (MSBuild) is the open-source build tool set that was introduced as a companion to the .NET Framework.

In fact, in the background, Visual Studio uses MSBuild to load and build managed projects. The project files in Visual Studio (.csproj, .vbproj, .vcxproj, etc) are actually MSBuild XML build projects that are executed when you build a project within the Visual Studio development environment.

How MSBuild fits in

By personalising the build script for your project, there are ways to incorporate and integrate many of the other additional required build steps required to create a production build, which can significantly improve build automation.

MSBuild comes with some inherent features:

  • Can run multiple processes simultaneously (multi-CPU) to parallel build and reduce build times
  • Declarative syntax to choose applicable files for each task
  • Declarative syntax for defining conditions for each task
  • Provides structured output for build-runners (such as TeamCity)

Examples of how we might extend MSBuild build scripts include:

  • To incorporate automated build steps that need to be run in a defined, structured sequence
  • To implement well-defined custom build versioning
  • To integrate with deployment tools and processes
  • To pre-process files before the projects reach the compiler
  • To compress/zip or obfuscate build outputs
  • And much more

What it means for you

MSBuild is a bit daunting and scary at first look — and often overlooked for the powerful tool that it is. There are numerous alternatives (some of which we use), but MSBuild remains a capable option and extremely useful. It is also already included and available with the standard .NET development environment, so typically works out of the box without installing additional build running components.

At Canary, we may incorporate use of MSBuild to personalise the build scripts for your projects. This comes in really useful, especially when working on substantial projects and can improve build processing and automation significantly.

This can be used to assist with packaging of outputs after compilation, and is one of the build runners that we may use when integrated with TeamCity, Octopus or Jenkins in our build scripts for pre-processing and post-processing for an efficient, streamlined build-to-deployment process.

  • It can involve substantial thought and work to prepare custom build scripts for complex projects but the significant improvements are worth it.
  • This is a competitive, standard build tool for .NET projects, and your Canary contact will be able to advise on whether it is a good fit to be incorporated in your project.
How can we help?

Use this form, or email [email protected]