[Tip] Python snippet increases the UWP product version

If you have a C# project and want to manage the assembly version info during automation build process such as the msbuild with Jenkins, then two options are available:

  1. Specify the version number in AssemblyInfo.cs to with asterisk(*) – n.n.* (for example, ‘1.0.*’)
  2. Or you might want to manage it with a build script such as python or powershell.

Here is a python build script to manage the version string within AssemblyInfo.cs and Package.appxmanifest.

Thanks,

Heejune

Writing a python build script for your Visual C++ project

If you’ve decided to write your own python build script for existing Visual Studio projects, then two questions would probably come up at first.
  1. What utility/commands are available for actually building *.sln/*. vcxproj files?
  2. How will you specify the appropriate version for your *.rc version resource file?
Solution for #1. You can download the MSBuild tools for free from the Microsoft download website, and it provides the solution you need. First, download the MS Build tools 2013(or 2015) depending on your Visual Studio project versions.
Solution for #2. You can easily modify/set the version number string on your *.rc resource file by using python regex. Here is the example.