Skip to content
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

After updating Windows 10, Windows can no longer manage any appx packages, and I can't deploy WinUI 3 apps from VS #4881

Open
kmgallahan opened this issue Nov 14, 2024 · 43 comments
Assignees

Comments

@kmgallahan
Copy link

kmgallahan commented Nov 14, 2024

I just updated Visual Studio to 17.13.0 Preview 1 and Windows to 19045.5131.

Now Visual Studio can no longer deploy WinUI 3 apps, I can't uninstall any apps, the Microsoft Store can't update any apps, and trying a different account also results in the Store malfunctioning.

It seems Windows has lost its ability to manage packages.

@DrusTheAxe From what I've seen you are an expert in this area. Any suggestions for how to approach this?

VS error is:

DEP0900: Failed to unregister application "myappid". [0x80073CFA] 
@Xo3-ToBapbl
Copy link

Can confirm. All our devs with win10 22H2 19045.5131, 19045.5011 machines faced with this issue. No problems for devs with win11 23H2 and above.

Just quick note, I think Visual Studio update is not the reason of this issue. We faced it on VS 17.9.7.

Related .NET MAUI topic:
dotnet/maui#25832

@sigroli
Copy link

sigroli commented Nov 14, 2024

We experienced the same issue and identified Windows update KB5046613 as the cause.

@riesem
Copy link

riesem commented Nov 14, 2024

Uninstalling KB5046613 does not help

@kmgallahan
Copy link
Author

Every time.

"I think I'll update some packages. I may as well update VS while I'm at it. Oh, it suggests a restart. Ah, Windows wants to update during the restart."

~

"I wonder how much time & money this is going to cost me."


Only "solution" I've found is a clean install, which isn't a solution at all. Maybe now that millions are impacted Microsoft will throw together some sort of fix...

@kmgallahan kmgallahan changed the title After updating VS & Windows 10, Windows can no longer manage any appx packages, and I can't deploy WinUI 3 apps from VS After updating ~VS &~ Windows 10, Windows can no longer manage any appx packages, and I can't deploy WinUI 3 apps from VS Nov 14, 2024
@kmgallahan kmgallahan changed the title After updating ~VS &~ Windows 10, Windows can no longer manage any appx packages, and I can't deploy WinUI 3 apps from VS After updating Windows 10, Windows can no longer manage any appx packages, and I can't deploy WinUI 3 apps from VS Nov 14, 2024
@S4nt1ag0
Copy link

Same problem here, how you "clean install" ? i am noobie in C# development. Do you click "Clean Solution" and Rebuild ?

@ivanjx
Copy link

ivanjx commented Nov 14, 2024

@S4nt1ag0 clean install the whole OS. while im at it, im installing win11. it seems that win10 is really dying already.

@axa88
Copy link

axa88 commented Nov 15, 2024

#MeToo right after Windows update.

@dillonricketts
Copy link

I had this issue with .NET 8 and Windows 10 22H2 19060.1000.0. Upgrading to Windows 11 was unfortunately the only thing that worked.

@robertbrestle
Copy link

I'm currently having this issue on Win10 22H2 builds 19045.5011 and 19045.5131. We started noticing this issue on 11/12.

@subratb
Copy link

subratb commented Nov 15, 2024

Please look at this. The discussion started here and lead up to the stated temporary solution.

@kmgallahan
Copy link
Author

@subratb That looks like a different issue, and it is a month old. This one is brand new this week.

@StevoSM
Copy link

StevoSM commented Nov 16, 2024

Experiencing the same here. Pretty much dead in the water until a fix is released. All development has been blocked.

@kmgallahan
Copy link
Author

@StevoSM You can just stick this in your csproj files to make them unpackaged until a fix is available - unless they require something only packages support.

        <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
        <WindowsPackageType>None</WindowsPackageType>

@johnt-star
Copy link

johnt-star commented Nov 16, 2024

I am now having same issue.

I added the above lines to my project file, first in an existing property group, now in their own as follows:
Image

Restarted Visual Studio, did a Clean and Rebuild Solution, but still get
Image

even though deploy option is set
Image

@kmgallahan
Copy link
Author

@johnt-star You need to change your configuration selection to Unpackaged.

Image

@johnt-star
Copy link

Thanks kmgallahan!

I no longer get the deployment error dialog after changing to Unpackaged.

Unfortunately after upgrading Visual Studio to the latest version, updating nuget packages where appropriate and installing .Net 9, I am now getting exceptions for things that use to work.

At least I can see what has changed and hopefully resolve them in order to get my app running again.

Appreciate the help!

@kmgallahan
Copy link
Author

One thing I had to do was add this to resolve some ref issues:

<OutputPath>$(SolutionDir)bin\$(Configuration)\</OutputPath>

@codendone
Copy link
Contributor

codendone commented Nov 17, 2024

There was an issue in the WinAppSDK 1.6.2 release which affected Windows 10 version 19045 machines. The 1.6.2 release has been pulled to prevent more machines being impacted.

This issue was not caused by an update to Windows and will not be fixed by uninstalling any Windows Cumulative Updates.

There is an upcoming Windows Update which will fix this issue (adding extra safety in Windows), and a release of WinAppSDK 1.6.3 is coming soon with a fix.

Machines in a bad state can also be manually fixed by running these steps:

  1. Launch a PowerShell or Command Prompt as Administrator and run these commands:
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant Administrators:F
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant Administrators:F
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
  1. Reboot
  2. Launch a PowerShell as Administrator and run these commands:
Get-AppxPackage *WinAppRuntime.Main.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-AppxPackage *MicrosoftCorporationII.WinAppRuntime.Singleton* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-AppxPackage *Microsoft.WinAppRuntime.DDLM* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-Appxpackage *WindowsAppRuntime.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Investigations are continuing and we'll provide further updates when available.

If you have an app project referencing the Microsoft.WindowsAppSDK package version 1.6.241106002, update the project to instead reference version 1.6.240923002. Removing version 1.6.241106002 from your local NuGet cache (such as C:\Users\<username>\.nuget\packages\microsoft.windowsappsdk\1.6.241106002) is also recommended to avoid accidental usage.

Investigations are continuing and we'll provide further updates when available.

@StevoSM
Copy link

StevoSM commented Nov 17, 2024

@codendone Thanks for the update. I don't know how helpful this might be, but we are only on WinAppSDK 1.4 and are experiencing the issue. We have not yet updated to 1.6 at all. In our environment, it must be the result of a Windows update or possibly that combined with a Visual Studio 2022 update.
Note also we cannot run Slack as it is in a state of needing to be updated by the Windows Store app, and the Windows Store app is not able to successfully complete app updates due to this same issue.

@codendone
Copy link
Contributor

@StevoSM There must be a different app on the system which is using 1.6. Running Get-Appxpackage *WindowsAppRuntime.1.6* -AllUsers in an administrative PowerShell can help see those.

@StevoSM
Copy link

StevoSM commented Nov 17, 2024

@codendone Apparently so. Your command revealed 3 results, 2 of which matched the problematic version. I went through your suggestion above and, well, it worked and we're back in business! Thanks so much for your hard work on this and posting those steps!

@Balkoth
Copy link

Balkoth commented Nov 18, 2024

@codendone
Your commands only work on an english OS. Once i got the first block working by replacing "Administrators" with the localized version i am stuck on step 3:

PS C:\WINDOWS\system32> Get-Appxpackage *WindowsAppRuntime.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Remove-AppxPackage : Der Remoteprozeduraufruf ist fehlgeschlagen.
Der Remoteprozeduraufruf ist fehlgeschlagen.
In Zeile:1 Zeichen:96
+ ... ere { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
+                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-AppxPackage], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

What now?

@kimpel70
Copy link

@codendone Your commands only work on an english OS. Once i got the first block working by replacing "Administrators" with the localized version i am stuck on step 3:

PS C:\WINDOWS\system32> Get-Appxpackage *WindowsAppRuntime.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Remove-AppxPackage : Der Remoteprozeduraufruf ist fehlgeschlagen.
Der Remoteprozeduraufruf ist fehlgeschlagen.
In Zeile:1 Zeichen:96
+ ... ere { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
+                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-AppxPackage], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

What now?

@Balkoth ,
i'm also running into this problem, and thanks for the tip regarding 'Adminstratoren'. The solution to your problem is, to copy each line individually and run them through powershell, not the whole block at once.

@kimpel70
Copy link

kimpel70 commented Nov 18, 2024

@codendone,
FYI, it is still possible to download the SDK 1.6.2 manually: https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads.
I got to this place, getting the following message (containing the link) while trying to deploy a MauiApp in Visual Studio 2022 for debugging.

DEP0840: Project 'MauiApp.Maui' requires packages 'MicrosoftCorporationII.WinAppRuntime.Main.1.5_8wekyb3d8bbwe' and 
'MicrosoftCorporationII.WinAppRuntime.Singleton_8wekyb3d8bbwe' with version >= '5001.178.1908.0'.
 These packages should be installed on first run, if not please visit http://go.microsoft.com/fwlink/?linkid=2222757 
for installation instructions.

@nidietr-MSFT
Copy link

@codendone Your commands only work on an english OS. Once i got the first block working by replacing "Administrators" with the localized version i am stuck on step 3:

PS C:\WINDOWS\system32> Get-Appxpackage *WindowsAppRuntime.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Remove-AppxPackage : Der Remoteprozeduraufruf ist fehlgeschlagen.
Der Remoteprozeduraufruf ist fehlgeschlagen.
In Zeile:1 Zeichen:96
+ ... ere { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
+                                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Remove-AppxPackage], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand

What now?

@Balkoth, this "Remote Procedure Call Failed" error comes from another issue causing AppxSvc crashes during package removal, which was fixed starting the optional update end of October (https://learn.microsoft.com/en-us/windows/release-health/resolved-issues-windows-10-22h2#3421msgdesc). Best would be to deploy the cumulative update from November 2024 (https://support.microsoft.com/en-us/topic/november-12-2024-kb5046613-os-builds-19044-5131-and-19045-5131-44e6c27e-e188-4dd5-8ad2-edde2e235c01).

@Balkoth
Copy link

Balkoth commented Nov 18, 2024

This is an enterprise managed device where i have no control over windows updates...

@kimpel70 It does not help to execute the lines once at a time, i already tried that.

@baaaaif
Copy link

baaaaif commented Nov 18, 2024

The really big problem is that existing app installations that are used productively can no longer be started by customers.
An admin now has to implement the workaround for hundreds of users. The Windows Update is therefore needed as soon as possible.
And the productive installations use an SDK 1.5.x version, not 1.6

@MarkRichardsACN
Copy link

@codendone we have a number of people at our company (including one of my machines) that have this. We do not have local admin rights, so I can't run the script steps you posted above. Btw, for us it is an Maui MSIX installed via Software Center, not the windows store.

When the SDK 1.6.3 comes out, will it "fix" broken machines, or will all affected users have to run your steps above ?

Thanks,
Mark

@codendone
Copy link
Contributor

WinAppSDK 1.6.3 is now available, providing access to the improvements in 1.6.2 minus the issue. This release does not fix any machine which is already in the bad state.

We're working on a better way to fix broken machines and will provide an update when available.

@IstvanKor
Copy link

IstvanKor commented Nov 19, 2024

In our case this issue happens not only to WinAppSDK applications, but when installing/uninstalling UWP applications as well. Trying to uninstall a UWP application we got 0x80073CFA error. Trying to install the same app we got "Remote Procedure Call Failed" error. We were facing this issue after applying KB5046613 update to win10 22H2. The problem occurs on the win 10 client machine, not on the dev machine. Development device is a win 11 pc in my case.
https://answers.microsoft.com/en-us/windows/forum/all/error-code-0x80073cfa-while-trying-to-uninstall-or/f74cc104-4aa7-4394-853c-7185b5275923

@danielancines
Copy link

There was an issue in the WinAppSDK 1.6.2 release which affected Windows 10 version 19045 machines. The 1.6.2 release has been pulled to prevent more machines being impacted.

This issue was not caused by an update to Windows and will not be fixed by uninstalling any Windows Cumulative Updates.

There is an upcoming Windows Update which will fix this issue (adding extra safety in Windows), and a release of WinAppSDK 1.6.3 is coming soon with a fix.

Machines in a bad state can also be manually fixed by running these steps:

  1. Launch a PowerShell or Command Prompt as Administrator and run these commands:
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant Administrators:F
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant Administrators:F
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
  1. Reboot
  2. Launch a PowerShell as Administrator and run these commands:
Get-AppxPackage *WinAppRuntime.Main.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-AppxPackage *MicrosoftCorporationII.WinAppRuntime.Singleton* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-AppxPackage *Microsoft.WinAppRuntime.DDLM* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-Appxpackage *WindowsAppRuntime.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Investigations are continuing and we'll provide further updates when available.

If you have an app project referencing the Microsoft.WindowsAppSDK package version 1.6.241106002, update the project to instead reference version 1.6.240923002. Removing version 1.6.241106002 from your local NuGet cache (such as C:\Users\<username>\.nuget\packages\microsoft.windowsappsdk\1.6.241106002) is also recommended to avoid accidental usage.

Investigations are continuing and we'll provide further updates when available.

First step worked for my Store Apps like WhatsApp, thank you.

@qhy040404
Copy link

There was an issue in the WinAppSDK 1.6.2 release which affected Windows 10 version 19045 machines. The 1.6.2 release has been pulled to prevent more machines being impacted.

This issue was not caused by an update to Windows and will not be fixed by uninstalling any Windows Cumulative Updates.

There is an upcoming Windows Update which will fix this issue (adding extra safety in Windows), and a release of WinAppSDK 1.6.3 is coming soon with a fix.

Machines in a bad state can also be manually fixed by running these steps:

  1. Launch a PowerShell or Command Prompt as Administrator and run these commands:
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant Administrators:F
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant Administrators:F
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
  1. Reboot
  2. Launch a PowerShell as Administrator and run these commands:
Get-AppxPackage *WinAppRuntime.Main.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-AppxPackage *MicrosoftCorporationII.WinAppRuntime.Singleton* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-AppxPackage *Microsoft.WinAppRuntime.DDLM* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Get-Appxpackage *WindowsAppRuntime.1.6* -AllUsers | Where { $_.Version -eq '6000.311.13.0' } | Remove-AppxPackage -AllUsers
Investigations are continuing and we'll provide further updates when available.

If you have an app project referencing the Microsoft.WindowsAppSDK package version 1.6.241106002, update the project to instead reference version 1.6.240923002. Removing version 1.6.241106002 from your local NuGet cache (such as C:\Users\<username>\.nuget\packages\microsoft.windowsappsdk\1.6.241106002) is also recommended to avoid accidental usage.

Investigations are continuing and we'll provide further updates when available.

It doesn't work for self-contained WASDK apps.

@WDSARRIA
Copy link

Luego de muchos intentos, instalé esto https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads y todo volvió a la normalidad

@clarjon1
Copy link

When attempting to run the second group of commands, each one would error out in the style of

Get-AppxPackage: The 'Get-AppxPackage' command was found in the module 'Appx', but the module could not be loaded due to the following error: [Operation is not supported on this platform. (0x80131539)]
For more information, run 'Import-Module Appx'.

After doing some digging, I found this command to force the loading of the module in powershell form

 Import-Module Appx -UseWinPS

Which allowed the commands to run happily.

@paul-d-ray
Copy link

Thank you.

Winget stopped working today after working yesterday.
I came across this when searching for the error code.

I did step one and Winget now works.

@dkuenne
Copy link

dkuenne commented Nov 20, 2024

Machines in a bad state can also be manually fixed by running these steps:

1. Launch a PowerShell or Command Prompt as Administrator and run these commands:
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant Administrators:F
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant Administrators:F
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"

For non-english localized systems the SID can be used:

takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant "$((Get-LocalGroup -SID S-1-5-32-544).Name):F"
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x64__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
takeown /F "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"
icacls "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll" /grant "$((Get-LocalGroup -SID S-1-5-32-544).Name):F"
del "C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.6_6000.311.13.0_x86__8wekyb3d8bbwe\WindowsAppRuntime.DeploymentExtensions.OneCore.dll"

@DeRuiterIndustrieleAutomatisering
Copy link

DeRuiterIndustrieleAutomatisering commented Nov 20, 2024

After I ran'Import-Module Appx --UseWindowsPowerShell I could execute most part of the second set of the solution. I was unable to uninstall my WSL2 distribution and that's working again

@DominicMaas
Copy link

snip

It doesn't work for self-contained WASDK apps.

Has anyone had experience with this workaround for self-contained WASDK (not self-contained .net) apps? I've got a few end users with this issue. Will get them to run the work-around, but not sure if it'll fix anything in my case.

@codendone
Copy link
Contributor

A simpler solution to fix a machine in a bad state is to run the WinAppSDK 1.6.3 installer multiple times. The installer is available at Latest downloads for the Windows App SDK - Windows apps | Microsoft Learn, with this as right installer for most machines:

Run that installer, which will fail the first time it is run. Run it again which usually succeeds. If necessary, run it again until it succeeds.

We're continuing work on a better fix for broken machines and will provide an update when available.

@GeoSaffer
Copy link

Thank you SOOOOOO much @codendone , this work great !!!!!

@developertest02
Copy link

Thank you. This was the only thing that worked.

@Micke3rd
Copy link

Micke3rd commented Nov 21, 2024

It doesn't work for self-contained WASDK apps.

yes, how could it.
I'm learning from this thread that setting WindowsAppSDKSelfContained=true should be avoided as deployment, to prevent isolating the app from bug fixes or optimizations from newer sdk versions.
Extending this thought, this also speaks against deploying with native AOT on.

@King-Taz
Copy link

Does not work for me using Windows 11. Deploy box still grayed out in VS. Tried to install multiple times, got this return.

Installing license: MSIX_MAINPACKAGE_LICENSE
Install License result : 0x0
Installing license: MSIX_SINGLETONPACKAGE_LICENSE
Install License result : 0x0
All install operations successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests