msix-packaging icon indicating copy to clipboard operation
msix-packaging copied to clipboard

[Question] appx-bundled app updates despite missing <UpdateSettings>

Open rubiktubik opened this issue 2 years ago • 4 comments

Hello i'am building and package an uwp-app with appx and distribute with a website and an .appinstaller-file:

<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
	Uri="https://pathTo/MyApp.UWP.appinstaller"
	Version="2.2.5645.0" xmlns="http://schemas.microsoft.com/appx/appinstaller/2018">
	<MainBundle
		Name="MyApp"
		Version="2.2.5645.0"
		Publisher="MyCompany"
		Uri="https://pathTo/MyApp.UWP_2.2.5645.0_QA_Test/MyApp.UWP_2.2.5645.0_x86_QA.appxbundle" />
	<Dependencies>
		<Package
			Name="Microsoft.NET.Native.Framework.2.2"
			Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
			Version="2.2.29512.0"
			ProcessorArchitecture="x86"
			Uri="https://pathTo/MyApp.UWP_2.2.5645.0_QA_Test/Dependencies/x86/Microsoft.NET.Native.Framework.2.2.appx" />
		<Package
			Name="Microsoft.NET.Native.Runtime.2.2"
			Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
			Version="2.2.28604.0"
			ProcessorArchitecture="x86"
			Uri="https://pathTo/MyApp.UWP_2.2.5645.0_QA_Test/Dependencies/x86/Microsoft.NET.Native.Runtime.2.2.appx" />
		<Package
			Name="Microsoft.VCLibs.140.00"
			Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US"
			Version="14.0.30704.0"
			ProcessorArchitecture="x86"
			Uri="https://pathTo/MyApp.UWP_2.2.5645.0_QA_Test/Dependencies/x86/Microsoft.VCLibs.x86.14.00.appx" />
	</Dependencies>
	
</AppInstaller>

as you can see, there is no updateSettings-Section in this file.

I want to prevent auto-updating my app. So i removed this section.

My problem is that despite this section is missing, my app is auto-updating itself why? And how i can prevent this?

My msbuild task looks like this:

msbuild MyApp.sln' +
					' /m' +
					' /nodeReuse:false' +
					' /p:Configuration=' + buildConfiguration +
					' /p:AppxBundlePlatforms="%buildArchitectures%"' +
					" /p:OutDir=\"${WORKSPACE}/out/\"" +
					' /p:AppxBundle=Always' +
					' /p:AppxPackageIsForStore=false' +
					' /p:BuildAppxUploadPackageForUap=true' +
					' /p:UapAppxPackageBuildMode=SideLoadOnly' +
					' /p:GenerateAppInstallerFile=True' +
					' /p:AppInstallerUri=https://pathTo/' + serverDeploymentDirectory + '/' +
					' /p:runcodeanalysis=never' +
					' /p:AppxPackageSigningEnabled=false' +
					' /target:Rebuild'

Best regards rubiktubik

rubiktubik avatar Jul 08 '22 13:07 rubiktubik

I asked one of the engineers on this feature. Paraphrasing his comments:

When <UpdateSettings> isn't present, the app shouldn't be configured to check for updates. However, if the user clicks on the AppInstaller file or goes through a repair, the most recent version of the app from the AppInstaller file will be installed. If you have a repro of the issue, it would be helpful to have a Feedback Hub bug filed under "Developer Platform" -> "App deployment".

To ensure that the app doesn't update, my advice would be to have a different AppInstaller file for each version of the app and to continue to not include <UpdateSettings>. If the AppInstaller file is never updated, the app shouldn't update.

florelis avatar Jul 12 '22 15:07 florelis

Thank you very much for the fast and detailed answer!!

We are using Target-Version "Windows 10 1803" and Min-Version "Windows 10 Fall Creators Update".

grafik

and "Microsoft (R)-Build-Engine, Version 16.9.0+57" which is still producing appxbundle instead of msixbundle could this be an issue?

rubiktubik avatar Jul 13 '22 06:07 rubiktubik

The file extension should not be an issue.

The file extension chosen by the build engine is not because it is outdated, but because you are targeting an older OS build which does not support the new file extension. The Supported platforms doc page shows when the .msixbundle format was introduced. As you can see, "Windows 10 Fall Creators Update" (1709) did not support .msixbundle. (I'm linking to an older version of the actual doc page because the 1709 was removed from the docs as it is no longer supported.)

florelis avatar Jul 15 '22 16:07 florelis

Ok i understand, i will try to create a repro. And in the meantime i will use your workaround suggestions.👌

rubiktubik avatar Jul 18 '22 06:07 rubiktubik