How to publish the UWP app package with release version? #3350
Answered
by
patriksvensson
KanniyappanP
asked this question in
Q&A
-
I am trying the build the WinUI UWP app packages with release version like 18., 18.1. etc., but it creates AppName.msixbundle with default version 1.0.0.0. How to create the app packages with custom version? I can create a app package with custom version through VisualStudio not using msbuild compilation. Build the project file with below settings. Cake.MSBuild(csProject.FullName, settings =>
settings.SetConfiguration("Release").
UseToolVersion(MSBuildToolVersion.VS2019).
WithProperty("SetMSBuildPlatform", "x86").
WithProperty("referencepath", referencepath).
WithRestore().
WithTarget("Build").
WithProperty("PreBuildEvent", "").
WithProperty("GenerateLibraryLayout", "true").
AddFileLogger(new MSBuildFileLogger { LogFile = warningLog, MSBuildFileLoggerOutput = MSBuildFileLoggerOutput.WarningsOnly }).
AddFileLogger(new MSBuildFileLogger { LogFile = errorLog, MSBuildFileLoggerOutput = MSBuildFileLoggerOutput.ErrorsOnly }).
WithProperty("OutputPath", projoutputpath).
WithProperty("IntermediateOutputPath", intermediateOutputPath).
WithProperty("AppxBundlePlatforms", "x86").
WithProperty("AppxBundle", "Always").
WithProperty("UapAppxPackageBuildMode", "Always").
WithProperty("UapAppxPackageBuildMode", "SideloadOnly").
WithProperty("AppxSymbolPackageEnabled", "True").
WithProperty("AppxPackageSigningEnabled", "True").
WithProperty("PackageCertificateThumbprint", "").
WithProperty("PackageCertificateKeyFile", $"{csProject.Directory}/CertificationKey.pfx").
WithProperty("PackageCertificatePassword", "****").
SetVerbosity(Cake.Core.Diagnostics.Verbosity.Minimal));` Thanks, |
Beta Was this translation helpful? Give feedback.
Answered by
patriksvensson
May 11, 2021
Replies: 1 comment 1 reply
-
@KanniyappanP You will need to update the var update = new Dictionary<string, string> {
{ "c:Package/c:Identity/@Version", "1.18.0.0" },
};
var manifest = File("./src/MyApp/Package.appxmanifest");
foreach(var item in update) {
XmlPoke(manifest, item.Key, item.Value,
new XmlPokeSettings {
Namespaces = {
{ "c", "http://schemas.microsoft.com/appx/manifest/foundation/windows10" },
{ "uap", "http://schemas.microsoft.com/appx/manifest/uap/windows10" },
{ "uap5", "http://schemas.microsoft.com/appx/manifest/uap/windows10/5" },
}
});
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
patriksvensson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@KanniyappanP You will need to update the
Package.appxmanifest
file for this.