Our 1.6 release shipped a number of interesting new features and enhancements to existing features, including those for MyGet Build Services. In this post, we’ll describe existing and new features and enhancements in a bit more detail.

One important thing to know is that Build Services is intended to make packaging projects easier. We are not aiming to become a full CI server like TeamCity of Team Foundation Server. That said, we do believe Build Services is appropriate for many scenarios and can take a lot of work out of your hands. We found some blog posts you may like: Nico Vermeir is using Build Services to package Windows Phone libraries. We also use it ourselves to push components from GitHub to NuGet.org.

Specify build configuration and platform

When creating or modifying a build source, you can now specify the configuration and platform that should be built. Easily switch between Release (the default configuration) or Debug or any other configuration that exists in your solution. The same goes for platform: if you wish to specifically build for x86, this can now be specified as the target platform.

Build configuration and platform

Note that we also set a %Configuration% and %Platform% environment variable during the build process. This way you can make use of these in your customized builds that are run using a build.bat file.

Package versioning

In earlier versions of MyGet Build Services, we’ve been generating a random incremental version number for packages created during build. From now on, we have support for true incremental build numbers through the build source settings

Specify package version number

The build counter starts with zero and increments with 1 on every build. You can also specify a version format ( Iuse '{0}' as a placeholder for the build counter) which will be generated during build. Note that if you enable the forbid packages which are non-compliant with Semantic Version option ,you should make sure the version format specified follows the Semantic Version rules.

We also set a %BuildCounter% and %PackageVersion% environment variable during the build process. This way you can make use of these in your customized builds that are run using a build.bat file.

Supported project types

We’ve added support for psake builds (use a built.bat file and invoke psake). Building Windows Phone 8 packages is now also supported out of the box. This brings us to the following list of supported frameworks and SDK’s:

  • .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0 and ,NET 4.5
  • PCL support (2012)
  • Windows Azure SDK
  • Windows Identity Foundation SDK
  • Silverlight 4, Silverlight 5
  • TypeScript SDK
  • psake

Regarding test runners, we now support

  • MsTest
  • MbUnit 2, MbUnit 3
  • NBehave
  • NUnit (up to 2.6.2)
  • xUnit.net
  • csUnit
  • RSpec

We believe adding these SDK’s out-of-the-box provides a lot of value to our users and we want to continue investing in expanding the number of supported SDK’s.

Environment variables

As part of the build process, we now set the following environment variables. Note that these are all read-only.

%BuildRunner%

Always "MyGet", can be used to determine if running on MyGet Build Services

%NuGet%

Path to a maintained-by-MyGet NuGet.exe

%SourcesPath%

Path to source code being built

%Configuration%

Build configuration (defaults to Debug)

%Platform%

Platform to build (defaults to blank)

%VersionFormat%

Version format specified in build configuration

%BuildCounter%

Build counter value

%PackageVersion%

%VersionFormat% with %BuildCounter% filled in, used as the auto-generated package version number

%EnableNuGetPackageRestore%

NuGet package restore enabled? Always true.

Other features

Some smaller features have been implemented for version 1.6 as well.

  • When building from GitHub/BitBucket, a link to the changeset that has been built is available from the build services tab.

image

  • Hanging build detection: whenever a build hangs for > 15 minutes, we kill the build process and set the build status to failed.
  • The build log can be copied to clipboard.
  • Build status is refreshed automatically.

Happy packaging!