question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE014: App manifest validation error: The app manifest must be valid as per schema

See original GitHub issue

Description

Error DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE014: App manifest validation error: The app manifest must be valid as per schema: Line 40, Column 6, Reason: Element ‘{http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities}Capability’ is unexpected according to content model of parent element ‘{http://schemas.microsoft.com/appx/manifest/foundation/windows10}Capabilities’. Expecting: {http://schemas.microsoft.com/appx/manifest/foundation/windows10}DeviceCapability. MauiApp2

Steps to Reproduce

  1. create a new .NET MAUI project
  2. go to Platforms > Windows > open Package.appxmanifest
  3. Replace
<Capabilities>
	  <rescap:Capability Name="runFullTrust" />
  </Capabilities>

with

<Capabilities>
	  <DeviceCapability Name="location"/>
  </Capabilities>

Link to public reproduction project repository

n/a

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows SDK 10.0.19041 - 22621

Did you find any workaround?

no. I have also tried

<Capabilities xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities">
  <DeviceCapability Name="location" />
</Capabilities>
<Capabilities>
  <uap:DeviceCapability Name="location" />
</Capabilities>
<Capabilities>
  <rescap:DeviceCapability Name="location" />
</Capabilities>
<Capabilities>
  <rescap:Capability Name="location" />
</Capabilities>

none, worked

Relevant log output

nothing else beside the error message. Nothing was generated in the event viewer either.

Issue Analytics

  • State:open
  • Created 5 months ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jfversluiscommented, May 23, 2023

Hey @vibol03 this got closed wrongfully it seems, sorry about that. I’ve been digging into this a little and here is what I found.

If you remove <rescap:Capability Name="runFullTrust" /> and add only <DeviceCapability Name="location" /> (or any other for that matter, it will give the error that you described.

While looking at the docs here. I found this notice

image

This confirmed a hunch I was having… So I decided to not include <rescap:Capability Name="runFullTrust" />, but do include <DeviceCapability Name="location" /> and trigger a build that shows this error.

When I then look in bin\Debug\net7.0-windows10.0.19041.0\win10-x64 I see the generated AppxManifest.xml file and inside of that there is this:

  <Capabilities>
    <DeviceCapability Name="location" />
    <rescap:Capability Name="runFullTrust" />
  </Capabilities>

Going back to the note from the docs just above: this is invalid.

So it seems that somewhere the <rescap:Capability Name="runFullTrust" /> is added back. But I’m not sure if that is something we are doing or Win UI is doing. @mattleibow do you have any idea?

From a quick test it seems that this might be on Win UI, because when I update the dependency for Microsoft.WindowsAppSDK the generated manifest seems to not have this entry anymore, however another error is preventing me from actually running the app so I can’t say for sure.

On the main branch (.NET 8), we have already updated the dependency to the latest version so if you are willing and able you might try the .NET 8 preview else I think you’re stuck just adding the runFullTrust entry as well. If you do that and add the location one after it, that should work as expected.

Reopening for the time being while we verify these things.

1reaction
vibol03commented, Apr 26, 2023

I’m not sure why this bug was closed. I have provided the required feedback since last week. Can someone please advise? thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to deploy .net MAUI windows app without using " ...
[0x80080204] error 0xC00CE014: App manifest validation error: The app manifest must be valid as per schema: Line 67, Column 6, Reason: Element ...
Read more >
Windows universal application (WIN 10) app manifest ...
It is some mismatch inside schemas. error 0xC00CE014: App manifest validation error: The app manifest must be valid as per schema: Line 23, ......
Read more >
Windows Application Packaging fails if i reference nuget ...
[0x80080204] error 0xC00CE014: App manifest validation error: The app manifest must be valid as per schema: Line 58, Column 8, Reason: Element ' ......
Read more >
Unity fails to install. — Mixed Reality Developer Forum
1>DEP0700 : Registration of the app failed. error 0xC00CE014: App manifest validation error: The app manifest must be valid as per schema: ...
Read more >
Windows Universal Application Error The app manifest ...
Windows Universal Application Error: The app manifest must be valid as per schema ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found