WindowsAppSDK icon indicating copy to clipboard operation
WindowsAppSDK copied to clipboard

PackageDeploymentManager.IsPackageReadyOrNewerAvailable() throws NotImplementedException even if IsPackageDeploymentFeatureSupported

Open whiskhub opened this issue 1 year ago • 1 comments

Describe the bug

PackageDeploymentManager.IsPackageReadyOrNewerAvailable() throws NotImplementedException even though PackageDeploymentManager.IsPackageDeploymentFeatureSupported(PackageDeploymentFeature.IsPackageReadyOrNewerAvailable) returns true.

Tested on Windows 11 24H2 (26100).

Note: it would be nice if on the docs page https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.windows.management.deployment.packagedeploymentmanager.ispackagereadyorneweravailable the requirement to call PackageDeploymentManager.IsPackageDeploymentFeatureSupported would be documented, together with a minimum supported OS version where this is expected to work.

Steps to reproduce the bug

var pdm = Microsoft.Windows.Management.Deployment.PackageDeploymentManager.GetDefault();
var isSupported = PackageDeploymentManager.IsPackageDeploymentFeatureSupported(PackageDeploymentFeature.IsPackageReadyOrNewerAvailable);
if (isSupported) 
{ 
    var isNewerAvailable = pdm.IsPackageReadyOrNewerAvailable(Package.Current.Id.FullName); // throws System.NotImplementedException
}

Expected behavior

Method does not throw and API works as expected.

Screenshots

No response

NuGet package version

Windows App SDK 1.6.1: 1.6.240923002

Packaging type

Packaged (MSIX)

Windows version

No response

IDE

Visual Studio 2022

Additional context

No response

whiskhub avatar Oct 19 '24 19:10 whiskhub

@DrusTheAxe @manodasanW

mominshaikhdevs avatar Oct 20 '24 07:10 mominshaikhdevs

Thank you for reporting this issue. This has been identified and fixed; the fix will be in the next patch update (1.6.2)

Internal bug tracking: https://task.ms/53958200

DrusTheAxe avatar Oct 21 '24 18:10 DrusTheAxe

@DrusTheAxe was this one fixed for version 1.6.241114003 ? I'm seeing the exception with ResetPackageAsync https://github.com/microsoft/WindowsAppSDK/issues/5031

tonymet avatar Jan 14 '25 21:01 tonymet