-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"System.NotImplementedException" in Microsoft.Windows.Management.Deployment.ResetPackageAsync version 1.6.241114003 #5031
Comments
related: #4817 |
I think you're first supposed to call The documentation is sadly still quite terrible, there is no mention of this: https://learn.microsoft.com/en-us/windows/windows-app-sdk/api/winrt/microsoft.windows.management.deployment.packagedeploymentmanager.ispackagedeploymentfeaturesupported?view=windows-app-sdk-1.6 |
Although I do wonder, why can PowerShell reset a MSIX package but not the WASDK? I ilspied into the [DllImport("AppXDeploymentClient.dll")]
private static extern int AppxResetPackage([MarshalAs(UnmanagedType.LPWStr)] string moniker); |
thank you and you are right that the call returns false. This bug may be best addressed by updating the documentation. why have the API if it's hardcoded false? |
thank you for the dllspy tip . I'll see if I can reverse-engineer that call. |
Describe the bug
Microsoft.Windows.Management.Deployment.ResetPackageAsync()
(documentation) raises System.NotImplementedException . Other methods are working in the same namespace , includingIsPackageReady
. Documentations says the methods are supported since WinSDK 1.5 .Example Code:
https://gist.github.com/tonymet/35f8c24e8f27e010c1cdea621abf85dd#file-mainwindow-xaml-cs
Steps to reproduce the bug
Expected behavior
msix package should be reset, similar to Powershell cmdlet
Reset-AppxPackage
Screenshots
Example .cs & exception trace
NuGet package version
Windows App SDK 1.6.3: 1.6.241114003
Packaging type
Packaged (MSIX)
Windows version
Insider Build (Version 10.0.22635 Build 22635)
IDE
Visual Studio 2022
Additional context
OS Name Microsoft Windows 11 Pro
Version 10.0.22635 Build 22635
Properties
The text was updated successfully, but these errors were encountered: