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 #25832

Closed
1 task
Transis-Felipe opened this issue Nov 13, 2024 · 54 comments
Labels
area-setup Installation, setup, requirements, maui-check, workloads, platform support blocked Work that is currently blocked external partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with partner/winui WinUI / Project Reunion platform/windows 🪟 s/triaged Issue has been reviewed t/bug Something isn't working
Milestone

Comments

@Transis-Felipe
Copy link

Transis-Felipe commented Nov 13, 2024

.NET MAUI Team notes

This issue isn't related to .NET MAUI or .NET9.

You can follow the WinUI issue here

Workaround posted here

microsoft/WindowsAppSDK#4881 (comment)

One thing to clarify here is that .NET 9 MAUI does depend on a 1.6.2 version of WinAppSDK but the version of WinAppSDK we are using for .NET9 depends on the 1.6.1 runtime which doesn't have this issue. Once the 1.6.3 version of the WinAppSDK is released, updating to that will not fix anything.

Original Description

Can't deploy MAUI projects to windows after upgrade to .net 9

DEP0900: Failed to unregister application "0acbd622-c89e-4564-8e05-7fcba762c402_1.0.0.64_x64__9zz4h110yvjzm". [0x80073CFA]

Steps to Reproduce

  1. Create a project

  2. Build the project

  3. Deploy to Windows Machine (Windows 10 in my case)
    Image

  4. Error
    Image

Powershell can't also remove the windows store app

Image

Link to public reproduction project repository

No response

Version with bug

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

microsoft/WindowsAppSDK#4881 (comment)

Relevant log output

Depends on

@Transis-Felipe Transis-Felipe added the t/bug Something isn't working label Nov 13, 2024
@sbwalker
Copy link

sbwalker commented Nov 14, 2024

I am experiencing the same problem with the official .NET 9 release - yet the application worked fine on the .NET 9 RC2 release (which I thought was the point of testing with the RC releases ie. to identify any potential issues).

Running the application results in:

Image

However the Configuration is already set to Deploy:

Image

Build / Deploy Solution results in:
DEP0900: Failed to unregister application "0E29FC31-1B83-48ED-B6E0-9F3C67B775D4_6.0.0.1_x64__9zz4h110yvjzm". [0x80073CFA]

@sbwalker
Copy link

sbwalker commented Nov 14, 2024

@Transis-Felipe I was able to resolve my problem by modifying PropertyGroup in my *.csproj

removing:

<ApplicationIdGuid>0E29FC31-1B83-48ED-B6E0-9F3C67B775D4</ApplicationIdGuid>

adding :

 <!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
    <WindowsPackageType>None</WindowsPackageType>

and modifying launchSettings.json to:

{
  "profiles": {
    "Windows Machine": {
      "commandName": "Project",
      "nativeDebugging": false
    }
  }
}

I then did a Solution Clean and Solution Rebuild.

(I identified these changes after reviewing a new .NET MAUI project that I created in .NET 9)

@mwilson25
Copy link

Thank you - this seemed to do the trick for me also. However, I still have the version of the app installed before this problem occurred and i cannot remove the package (Powershell: Remove-AppXPackage) or uninstall the app. I tried my project on another "clean" development computer and all is well without your changes, so this points to the "jammed package" being the problem.

@ehoward0018
Copy link

This is happening to us as well. It appears to only be a problem for Windows 10 as far as I can tell, and most likely comes from the latest Windows update as we did not update our Visual Studio Version but it still doesn't allow us to uninstall those packages.

@Xo3-ToBapbl
Copy link

Can confirm @ehoward0018 message. All our devs with win10 22H2 machines faced with this issue. No problems for devs with win11 23H2 and above.

Important note: we did not update our app to .NET9.

Potential workaround might be to run System File Checker tool from CMD: sfc /scannow, then restart your machine and debugging will be fixed.

@TobiasJoergensen
Copy link

Same issue. 22H2 and 19060.1000.0.

@sbwalker
Copy link

I can confirm I am running Windows 10 as well

@ivanjx
Copy link

ivanjx commented Nov 14, 2024

@Xo3-ToBapbl sfc /scannow and restarting does not work. i guess im going to need to install win11.

@Mzazvor
Copy link

Mzazvor commented Nov 14, 2024

I did manage to upgrade my project to .net 9. It worked for a while and then got stucked with DEP0900. I cant even uninstall the old maui programs that i still have in my PC using windows remove program feature. I have win 10.

@S4nt1ag0
Copy link

@Transis-Felipe I was able to resolve my problem by modifying PropertyGroup in my *.csproj

removing:

<ApplicationIdGuid>0E29FC31-1B83-48ED-B6E0-9F3C67B775D4</ApplicationIdGuid>

adding :

 <!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
    <WindowsPackageType>None</WindowsPackageType>

and modifying launchSettings.json to:

{
  "profiles": {
    "Windows Machine": {
      "commandName": "Project",
      "nativeDebugging": false
    }
  }
}

I then did a Solution Clean and Solution Rebuild.

(I identified these changes after reviewing a new .NET MAUI project that I created in .NET 9)

Same problem here, when i apply this changes i got this error:
O programa "[2760] MyProgram.exe" foi fechado com o código 3221226356 (0xc0000374).

@TedKerley
Copy link

I also have this problem. Can no longer execute a maui application.
Version 10.0.19045 Build 19045

Updates were installed today but failed.
Image

@robertbrestle
Copy link

I'm also seeing the same issue for both .NET 8 and .NET 9 on Windows 10. Below is some of my troubleshooting.

When attempting to uninstall through settings, we get the following error:
Image

When attempting to debug, we get the same error with more details:

Unregistering application EAEA399A-B96B-4688-A8A8-2925B58E11FF_2.4.3.7_x64__0p9bedgggxnzg, architecture 9...
Registering UWP app with manifest: C:\Users\rbrestle\RiderProjects\PROJECT\PROJECT\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppX\AppxManifest.xml arch X64...
Register application failed return code is 1.
STDERR: ERROR: The asynchronous operation was failed: Install failed. Please contact your software vendor (hresult_error:80073CF9)[location] = Z:\BuildAgent\work\efa2be849acae02a\dotnet\Rider\Native\Solution\winrt_launcher\src\utility.hpp(41)[function] = void __cdecl jbrs::wait_for_finished(const struct winrt::com_ptr<struct IAsyncInfo> &)[uri] = C:\Users\rbrestle\RiderProjects\PROJECT\PROJECT\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\AppX\AppxManifest.xml

Trying to uninstall with AppX powershell module results in the same error:

PS C:\Windows\System32> Remove-AppxPackage -Package EAEA399A-B96B-4688-A8A8-2925B58E11FF_2.4.3.7_x64__0p9bedgggxnzg
Remove-AppxPackage: Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor. (Exception from HRESULT: 0x80073CFA)

NOTE: For additional information, look for [ActivityId] 6d0e6d58-35ec-000c-e207-276dec35db01 in the Event Log or use the command line Get-AppPackageLog -ActivityID 6d0e6d58-35ec-000c-e207-276dec35db01

With the Activity log output returning nothing:

PS C:\Windows\System32> Get-AppPackageLog -ActivityID 6d0e6d58-35ec-000c-e207-276dec35db01

Time                      ID           Message
----                      --           -------


PS C:\Windows\System32>

But the event viewer is showing a crash:

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: svchost.exe_AppXSvc
P2: 10.0.19041.4355
P3: 9ce47784
P4: appxdeploymentserver.dll
P5: 10.0.19041.5007
P6: 738541ef
P7: c0000005
P8: 00000000001fcceb
P9: 
P10: 

 

The suggested changes from @sbwalker result in the following error when building, though this may be due to legacy settings and other project configurations.
Could not load appxrecipe from $C:\Users\rbrestle\RiderProjects\PROJECT\PROJECT\bin\Debug\net8.0-windows10.0.19041.0\win10-x64\PROJECT.build.appxrecipe

 

Running sfc /scannow and restarting has also not helped. Checking the logs, it looks like there are issues with AppX:

2024-11-14 12:46:39, Info                  CSI    00000058 [SR] Beginning Verify and Repair transaction
2024-11-14 12:46:40, Info                  CSI    00000059 Hashes for file member [l:12]'settings.dat' do not match.
 Expected: {l:32 ml:33 b:7fbb3e503ed8a4a8e5d5fab601883cbb31d2e06d6b598460e570fb7a763ee555}.
 Actual: {l:32 b:d20b3374b66ac063c7554139d9addfee89ae1c7e739827f0b47f5a0edec43303}.
2024-11-14 12:46:40, Info                  CSI    0000005a [SR] Cannot repair member file [l:12]'settings.dat' of Microsoft-Windows-AppX-Deployment-Server, version 10.0.19041.5007, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2024-11-14 12:46:40, Info                  CSI    0000005b Hashes for file member [l:12]'settings.dat' do not match.
 Expected: {l:32 ml:33 b:7fbb3e503ed8a4a8e5d5fab601883cbb31d2e06d6b598460e570fb7a763ee555}.
 Actual: {l:32 b:d20b3374b66ac063c7554139d9addfee89ae1c7e739827f0b47f5a0edec43303}.
2024-11-14 12:46:40, Info                  CSI    0000005c [SR] Cannot repair member file [l:12]'settings.dat' of Microsoft-Windows-AppX-Deployment-Server, version 10.0.19041.5007, arch amd64, nonSxS, pkt {l:8 b:31bf3856ad364e35} in the store, hash mismatch
2024-11-14 12:46:40, Info                  CSI    0000005d [SR] This component was referenced by [l:159]'Microsoft-Windows-Client-Desktop-Required-Package05110~31bf3856ad364e35~amd64~~10.0.19041.5007.1B99FCA95115E653F7DCDF5AC5D370CDEDBD0E3471303C0BF42B8199A6BDAF29'
2024-11-14 12:46:40, Info                  CSI    0000005e Hashes for file member [l:12]'settings.dat' do not match.
 Expected: {l:32 ml:33 b:7fbb3e503ed8a4a8e5d5fab601883cbb31d2e06d6b598460e570fb7a763ee555}.
 Actual: {l:32 b:d20b3374b66ac063c7554139d9addfee89ae1c7e739827f0b47f5a0edec43303}.
2024-11-14 12:46:40, Info                  CSI    0000005f Hashes for file member [l:12]'settings.dat' do not match.
 Expected: {l:32 ml:33 b:7fbb3e503ed8a4a8e5d5fab601883cbb31d2e06d6b598460e570fb7a763ee555}.
 Actual: {l:32 b:d20b3374b66ac063c7554139d9addfee89ae1c7e739827f0b47f5a0edec43303}.
2024-11-14 12:46:40, Info                  CSI    00000060 [SR] Could not reproject corrupted file \??\C:\Windows\System32\\settings.dat; source file in store is also corrupted

 

I'm doing some testing with Windows 11, but any other information to fix this on Windows 10 would be extremely helpful.

@mwilson25
Copy link

I am on Win 10 also and have had the same experience as all of you. I would say Microsoft owes us a fix as MAUI should work on WIN 10. Do we have to report it directly to them?

@elTRexx
Copy link

elTRexx commented Nov 15, 2024

Same issue since yesterday. Made me a little mad. On Windows 10 too.
And it happen from "nowwhere". I mean I was coding my testing MAUI app, running some test switching between android emulator and windows machine, and then hit this issue while it was working just few minutes ago !
For the record here is what I tried, without any success.

So I suspected I broke something by switching on and off from android to windows platform, finally end up saw that it was related with the Microsoft app store, and also removing application from settings failed too, and also with powershell as admin.

Trying toubleshooter wizard from Settings for app store.
I end up re enabling Microsoft store running in background and as the troubleshooter told me that it was related to the BITS service I re enabled from services to run automatically. But it didn't work out.

I also decided to uninstall completely Visual Studio, reinstall it, creating a new default MAUI project.
It was targeting .Net 9 and it worked this time. So I tried to create yet another default MAUI project, but targeting .Net 8 instead. And I came back to the same issue again !

I finally tried to edit Package.appxmanifest in Visual Studio : Changing the package Name as I saw on internet maybe the error is related to the name of the package and / or it version detected to be a downgrade (so I increased the version number). I even tryied with a creating a testing certificate (.pfx). But none worked out.

@TobiasJoergensen
Copy link

Just to further confirm it is a win10 related issue. I was lucky to be in my win11 enrollment process, and after upgrading last night I can now build again.

@HNordhaus
Copy link

"Just to further confirm it is a win10 related issue. I was lucky to be in my win11 enrollment process, and after upgrading last night I can now build again."

Hi Tobias,
does that mean that updating a "broken" system to Windows 11 "fixes" the problem?
Thanks,
Henrik

@TobiasJoergensen
Copy link

"Just to further confirm it is a win10 related issue. I was lucky to be in my win11 enrollment process, and after upgrading last night I can now build again."

Hi Tobias, does that mean that updating a "broken" system to Windows 11 "fixes" the problem? Thanks, Henrik

Hi Henrik,
Yes, that was the case for me. I was seeing the DEP0900 yesterday before updating to Windows 11. Now today I have had no issues after upgrading to windows 11.
Does not seem like a good fix, but at least it is a work around for those able.

@R-zr
Copy link

R-zr commented Nov 15, 2024

We have a similar problem when deploying our apps to W10 clients. As a workaround we are doing tests by adding a global.json in the root of the project (next to the solution file) with the following content:

{
    "sdk": {
        "version": "8.0.306"
    }
}

Currently we are assuming that the bug in regard to W10 seems introduced on the 12th of November in the latest .NET 8.0 release (8.0.11) with in our case SDK 8.0.307. The global.json forces a specific SDK version to be used (in our case; the build server), with which we had no problems in the past. I will update my comment with our findings, might be worth a try.

EDIT:
It seems that when we build our app using the older SDK (8.0.306) we are no longer facing problems when uninstalling/unregistering/updating on freshly installed W10 clients.

@mikeparker104 mikeparker104 added the partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with label Nov 15, 2024
@Xo3-ToBapbl
Copy link

Xo3-ToBapbl commented Nov 15, 2024

We have a similar problem when deploying our apps to W10 clients. As a workaround we are doing tests by adding a global.json in the root of the project (next to the solution file) with the following content:

{
"sdk": {
"version": "8.0.306"
}
}
Currently we are assuming that the bug in regard to W10 seems introduced on the 12th of November in the latest .NET 8.0 release (8.0.11) with in our case SDK 8.0.307. The global.json forces a specific SDK version to be used (in our case; the build server), with which we had no problems in the past. I will update my comment with our findings, might be worth a try.

EDIT: It seems that when we build our app using the older SDK (8.0.306) we are no longer facing problems when uninstalling/unregistering/updating on freshly installed W10 clients.

Thanks for your investigation! I want to clarify: are you sure that your clients with freshly installed win10 have latest updates (KB5046613)? We have no issues with users on win10 without latest updates.

@R-zr
Copy link

R-zr commented Nov 15, 2024

We have a similar problem when deploying our apps to W10 clients. As a workaround we are doing tests by adding a global.json in the root of the project (next to the solution file) with the following content:
{
"sdk": {
"version": "8.0.306"
}
}
Currently we are assuming that the bug in regard to W10 seems introduced on the 12th of November in the latest .NET 8.0 release (8.0.11) with in our case SDK 8.0.307. The global.json forces a specific SDK version to be used (in our case; the build server), with which we had no problems in the past. I will update my comment with our findings, might be worth a try.
EDIT: It seems that when we build our app using the older SDK (8.0.306) we are no longer facing problems when uninstalling/unregistering/updating on freshly installed W10 clients.

Thank for your investigation! I want to clarify: are you sure that your clients with freshly installed win10 have latest updates (KB5046613)? We have no issues with users on win10 without latest updates.

I can confirm that KB5046613 is installed via Windows Update earlier this week (12th November). Our clients are running a up-to-date Windows 10 IoT Enterprise LTSC 2021 (21H2) for what it's worth.

@skyclasher
Copy link

We encounter a similar issue when trying to update or remove our application, regardless of whether we use the .msix installer or the PowerShell script install.ps1.

Building with SDK version 8.0.306 did not resolve the issue for us.
We are using Windows 10 with KB5046613 installed.

Error log excerpt:

11/15/2024 8:05:46 PM     605          The last successful state reached was MachineRegisterRemove. Failure occurred
                                       before reaching the next state De-Indexed. hr: 0x8007139F
11/15/2024 8:05:46 PM     300          error 0x8007139F: Cannot register the
                                       CentricSoftTechSdn.Bhd.Centric-POS_69aszxhse8awm package due to the following
                                       error: The group or resource is not in the correct state to perform the
                                       requested operation.

@truecrimson
Copy link

Same issue for us using .NET 8 and Windows 10. Removing the latest Windows updates has been a temporary fix for us.

@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. No code/config changes.

@davidortinau
Copy link
Contributor

We are actively chasing this down.

Ref: microsoft/WindowsAppSDK#4881

@SubdudedCrane651
Copy link

Fix frustrating bug with visual studio in Windows 10 after update

<WindowsPackageType>None</WindowsPackageType>

and modifying launchSettings.json to:

{
"profiles": {
"Windows Machine": {
"commandName": "Project",
"nativeDebugging": false
}
}
}
I then did a Solution Clean and Solution Rebuild.

Worked for me after reinstalling Visual Studio. Another thing I did was clone my git before for each project. After which I was able to run windows, and create Android and iOS apps with ease. I can use NET 8 which suites me fine.

@robertbrestle
Copy link

As with @skyclasher, changing the SDK version to anything older than 8.0.404 did not change the result.

With my troubleshooting from yesterday, I was on the following version, which did not include KB5046613:

Windows 10 Pro 22H2 Build 19045.5011
Windows Feature Experience Pack 1000.19060.1000.0

After updating to build 19045.5131 (with KB5046613), the error persists.

Thank you @davidortinau for linking the WindowsAppSDK issue!

@PureWeen PureWeen pinned this issue Nov 16, 2024
@TPLindley
Copy link

Having same issue, wondering if there are any updates?

@King-Taz
Copy link

Having same issue, wondering if there are any updates?

Installing/updating to Win11 appears to be the only fix for now.

@DvoracekMartin
Copy link

Can confirm that updating to Win11 fixes the issue.

@simon-rossmann-minesservice
Copy link

simon-rossmann-minesservice commented Nov 16, 2024

Sorry, but changing Operating Systems can hardly be called a fix. Since i updated both, visual Studio and Windows at the same time, i am not sure which update broke the system. But i can't work right now and i doubt, any other maui developer can.

Seems to be appx / msix related issue confirmed since debugging as non msix package works for me. But i cannot deploy to msix package which is a problem that might be fixed by using a temp win 11 machine

Update: This temporary solution worked for me
Now i can uninstall appx packages again and also Debug and deploy using windows 10.
Please keep in mind, depending on your language Settings, the commands in the linked post need to be adjusten. Group name Administrators might be called different on your machine. In german, it would be Administratoren e.g.

@King-Taz
Copy link

Can also confirm that updating to Win11 fixes issue

@PureWeen
Copy link
Member

Workaround posted here

microsoft/WindowsAppSDK#4881 (comment)

One thing to clarify here is that .NET 9 MAUI does depend on a 1.6.2 version of WinAppSDK but the version of WinAppSDK we are using for .NET9 depends on the 1.6.1 runtime which doesn't have this issue. Once the 1.6.3 version of the WinAppSDK is released, updating to that will not fix anything.

@lbegue
Copy link

lbegue commented Nov 18, 2024

I can confirm that that workaround https://github.com/microsoft/WindowsAppSDK/issues/4881#issuecomment-2480939942 worked for me in Windows 10.
I had tried everything and I was desperate. Thank you.
Now my MAUI application is deploying without problems and I have been able to uninstall the old applications that were impossible to remove before appliying the workaround.

@elTRexx
Copy link

elTRexx commented Nov 18, 2024

Should we be using the workaround right now, or fix is coming soon enough that it is better to wait for it ?

@BennKjaer62
Copy link

I'm also having the same issue.
I have tried to delete the key directly in Regedit, but this also return an error - Unable to delete.

@King-Taz
Copy link

King-Taz commented Nov 18, 2024

I upgraded to win11 and that allowed me to unregister older apps and continue coding. However, I'm now unable to deploy new Maui projects. The Deploy checkbox in VS configuration manager is grayed out. Can anyone duplicate this? I simply used either of the default maui demos (button clicker and task manager). I don't think I missed any settings anywhere, but am unsure. I tried running VS as administrator, no change.

@mattleibow mattleibow added area-setup Installation, setup, requirements, maui-check, workloads, platform support platform/windows 🪟 blocked Work that is currently blocked labels Nov 18, 2024
@mattleibow mattleibow added this to the Backlog milestone Nov 18, 2024
@mattleibow
Copy link
Member

Adding the issue to the "backlog" simply because the system demands that I put it somewhere. We are most likely not able to action on this and will have to wait for a fix to roll out to the OS/update/Store.

@samhouts samhouts added external partner/winui WinUI / Project Reunion labels Nov 18, 2024
@King-Taz
Copy link

King-Taz commented Nov 18, 2024

I'm not sure what causes this error. I can create new maui apps with latest VS using net8 which can be deployed.
Image

Doing the exact same using net9, the app cannot be deployed (deploy box grayed out).
Image

The work-around seems to be create the app in net8 and upgrade it to net9 through project file. This is working for my older apps.

@SubdudedCrane651
Copy link

SubdudedCrane651 commented Nov 18, 2024 via email

@King-Taz
Copy link

King-Taz commented Nov 19, 2024

and compile in Android and iOS with ease

Compiling in Android and iOS was never the issue though, it wasn't an issue for me anyway.

@amosekr
Copy link

amosekr commented Nov 19, 2024

{
"profiles": {
"Windows Machine": {
"commandName": "Project",
"nativeDebugging": false
}
}
}

I am also facing the same problem, It works. Thanks

@DrJim106
Copy link

Facing the same issue with my machine with Windows 22H2 /Win 10. I think the latest update is the root cause of this problem. All I can say is "what a goddamn problem is this" .lmao

@GeoSaffer
Copy link

Having the same issue with windows 10 and Maui as everyone else here.

Tried manually removing files, manually removing registry keys related to it. soooo many things. and still nothing.

pleae if anyone know how to fix this, I would really appreciate it.

@GeoSaffer
Copy link

I can Confirm that the following link work perfectly for me

microsoft/WindowsAppSDK#4881 (comment)

then reboot and BONUS !!!!, I was able to deploy again

@Dopamax
Copy link

Dopamax commented Nov 21, 2024

I can Confirm that the following link work perfectly for me

microsoft/WindowsAppSDK#4881 (comment)

then reboot and BONUS !!!!, I was able to deploy again

@GeoSaffer Thanks, it worked for me too.

@King-Taz
Copy link

This did not work for me

I can Confirm that the following link work perfectly for me

microsoft/WindowsAppSDK#4881 (comment)

then reboot and BONUS !!!!, I was able to deploy again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-setup Installation, setup, requirements, maui-check, workloads, platform support blocked Work that is currently blocked external partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with partner/winui WinUI / Project Reunion platform/windows 🪟 s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests