Increment management pack version from command prompt

I like Authoring Console’s “Auto-increment management pack version on save” option. It’s a good idea to turn it on when you do MP development. But what if you work in a team? What if you’re concentrated on developing some MP parts like scripts or reports and you do not even need to open Authoring Console because code injection is automated? That’s my case, so I decided to find a way to increment management pack version at build time.

There are hundreds of ways to implement that. To name a few:

  • Find and replace tools
  • Build tools with XML support like MSBuild or  NAnt
  • PowerShell scripts
  • Custom console application

For various reasons I chose the last option. Here is an outcome:

Tool name:

 MPIncrementBuildNumber

Usage:

 MPIncrementBuildNumber

Notes:

Last part of MP version will be incremented by 1, management pack file will be overwritten.

Downloads:

Executable and source code can be downloaded from this page.

Leave a Comment