I am building an UWP app and I want to have generated package to be named with the build number in order to distinguish the builds. So far, I have this configuration in the csproj file:
<Target Name="BeforeBuild">
<Message Text="Updating AssemblyInfo to Version $(VersionNumber)"></Message>
<Message Text="Writing to AssemblyInfo files in $(SolutionRoot)"></Message>
<AssemblyInfo CodeLanguage="CS"
AssemblyCompany="Company"
AssemblyProduct="Product"
AssemblyCopyright="Copyright © Company 2011"
ComVisible="true"
AssemblyVersion="$(BUILD_NUMBER)"
AssemblyFileVersion="$(BUILD_NUMBER)" />
</Target>
All good, I can run the msbuild with the /p:BUILD_NUMBER=1.2.3.4
argument, but this is only reflecting in AssemblyInfo.cs
file.
The .appx file will be named as MyApplication.Core_1.0.0.0_x86_Test.appx
and not MyApplication.Core_1.2.3.4_x86_Test.appx
How can I use the BUILD_NUMBER information to be reflected in the .appx file name?