c# – Cant Run MAUI Project getting below Error – The Project need to be deployed before we can debug. please enable deploy in the Configuration Manager


I’ve found that this hits anytime my APPX package is invalid.


For example, including an invalid capability or having duplicate extensions. Once I fix those errors, F5 works again. You can verify your APPX by installing the loose files manually:

cd /my/output/dir
add-appxpackage -register ./AppXManifest.xml

I was getting clearer errors like:

Add-AppxPackage: Deployment failed with HRESULT: 0x80080204, The Appx package’s manifest is invalid.

error 0x80080204: App manifest validation error: Line 73, Column 27, Reason: The field “[local-name()=’Extensions’]/[local-name()=’Extension’]/[local-name()=’InProcessServer’]/[local-name()=’ActivatableClass’]” with value “MyApp.XamlMetaDataProvider” must only be declared once. A duplicate exists on Line 51, Column 27.

NOTE: For additional information, look for [ActivityId] ffb3a6e7-89f9-0003-08d4-0600fa89db01 in the Event Log or use the command line Get-AppPackageLog -ActivityID ffb3a6e7-89f9-0003-08d4-0600fa89db01

And:

Add-AppxPackage: Deployment failed with HRESULT: 0x80073CF6, Package could not be registered.

Authorization of capabilities for MyApp_1.0.0.0_x64__ab5n1h2txxxxxx failed with error code 0x800701C5.

NOTE: For additional information, look for [ActivityId] ffb3a6e7-89f9-0002-3d4e-0100fa89db01 in the Event Log or use the command line Get-AppPackageLog -ActivityID ffb3a6e7-89f9-0002-3d4e-0100fa89db01


Once I fixed those errors, Add-AppXPackage began working & so did F5 deploy. See my comment in a related GitHub issue.

Leave a Reply

Your email address will not be published. Required fields are marked *