I created appx package using makeappx.exe. Also I did the changes on Jenkins so that on each build I could have appx as output. Now on each build I am getting appx with same version number as this version is set in AppxManifest.xml I want to increment the version of appx package on each build. How to do so?
How to auto-increment the version in AppxManifest.xml when appx is created using MakeAppx tool?
1k Views Asked by Ankush Butole At
2
There are 2 best solutions below
0

If you use a Debug version, try this step:
- map file
MakeAppx.exe need a map file to finish the work, most of the information are included in this file: obj\x64\Debug\package.map.txt
Open it, it the 2nd line, it refer to a file: bin\x64\Debug\Core\AppxManifest.xml
- AppxManifest.xml
Open this file, you can find this information in line 10:
Modify the version number, then pack your project like this:
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\MakeAppx.exe" pack /l /h sha256 /f ".\obj\x64\Debug\package.map.txt" /o /p .\AppPackages\test.msix
The the test.msix file version number changed!
- Automatic change version number
Save the version number in some where(like a file), and before you call MakeAppx.exe, increase the number and update it in the AppxManifest.xml
The version can be updated in
Package.appxmanifest
of the project before every time it is built. For example:After the project build, you could find the version in
AppxManifest.xml
. But you could just edit theAppxManifest.xml
to update the version before package.MakeAppx.exe
defined the package version depend on the version insideAppxManifest.xml
.MakeAppx.exe
doesn't have command to re-set the package version for creating an app package. You may not update the version throughMakeAppx.exe
.But if you create an app bundle, you can specifies the version number of the bundle by
/bv
command ofMakeAppx.exe
. Details please reference "Create an app bundle section" of Create an app package with the MakeAppx.exe tool.