After updating Windows 10, Windows can no longer manage any appx packages, and I can't deploy WinUI 3 apps from VS
.NET MAUI Team notes
This issue isn't related to .NET MAUI or .NET9.
You can follow the WinUI issue here
Workaround posted here
https://github.com/microsoft/WindowsAppSDK/issues/4881#issuecomment-2480939942
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
-
Create a project
-
Build the project
-
Deploy to Windows Machine (Windows 10 in my case)
-
Error
Powershell can't also remove the windows store app
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?
https://github.com/microsoft/WindowsAppSDK/issues/4881#issuecomment-2480939942
Relevant log output
Depends on
- [ ] https://github.com/microsoft/WindowsAppSDK/issues/4881
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:
However the Configuration is already set to Deploy:
Build / Deploy Solution results in: DEP0900: Failed to unregister application "0E29FC31-1B83-48ED-B6E0-9F3C67B775D4_6.0.0.1_x64__9zz4h110yvjzm". [0x80073CFA]
@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)
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.
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.
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.
Same issue. 22H2 and 19060.1000.0.
I can confirm I am running Windows 10 as well
@Xo3-ToBapbl sfc /scannow and restarting does not work. i guess im going to need to install win11.
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.
@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).
I also have this problem. Can no longer execute a maui application. Version 10.0.19045 Build 19045
Updates were installed today but failed.
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:
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.
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?
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.
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.
"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
"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.
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.
We have a similar problem when deploying our apps to W10 clients. As a workaround we are doing tests by adding a
global.jsonin 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.jsonforces 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.
We have a similar problem when deploying our apps to W10 clients. As a workaround we are doing tests by adding a
global.jsonin 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. Theglobal.jsonforces 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.