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.

App Manifest Validation Error: The attribute 'ShortName' with value '*' failed to parse.

See original GitHub issue

Description

I am in developer mode on my machine(s) running

  • Windows 10 21H2 (19044.2130)
  • Visual Studio 2022 17.3.6
  • .NET 6.0.402 (commit 6862418796) with win10-x64 and base path c:\Program Files\dotrnet\sdk\6.0.402
  • maui-windows 6.0.541/6.0.400 VS 17.3.32929.385

When building a clean MAUI .NET template I get the following error:

DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE16A: App manifest validation error: The app manifest must be valid as per schema: Line 27, Column 144, Reason: Union doesn't support this value.
The attribute 'ShortName' with value 'KodeFoxx.SimpleBroadcast.Presentation.App' failed to parse.	KodeFoxx.SimpleBroadcast.Presentation.App	

Bugs (edit by @mattleibow )

  • A long ApplicationTitle results in a build error
  • #11046

Steps to Reproduce

  1. Create File -> New MAUI .NET APP
  2. Set to debug, select .net6.0-windows10.0.19041.0 as target to run
  3. Press the green button

Expected outcome: -> See a .NET MAUI app appear as it comes from the template

Current outcome: -> Error on parsing, see below for output. Can’t seem to find where to find or fix this file even. The app manifest must be valid as per schema: Line 27, Column 144, Reason: Union doesn’t support this value. The attribute ‘ShortName’ with value ‘KodeFoxx.SimpleBroadcast.Presentation.App’ failed to parse.

Link to public reproduction project repository

https://github.com/KodeFoxx-Projects/KodeFoxx.SimpleBroadcast/tree/main/Source/Presentation/KodeFoxx.SimpleBroadcast.Presentation.App

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

Windows 10 21H2 (19044.2130)

Did you find any workaround?

Not yet.

Relevant log output

Installed Workload Ids      Manifest Version      Installation Source
---------------------------------------------------------------------
maui-windows                6.0.541/6.0.400       VS 17.3.32929.385
maui-maccatalyst            6.0.541/6.0.400       VS 17.3.32929.385
maccatalyst                 15.4.465/6.0.400      VS 17.3.32929.385
maui-ios                    6.0.541/6.0.400       VS 17.3.32929.385
ios                         16.0.517/6.0.400      VS 17.3.32929.385
maui-android                6.0.541/6.0.400       VS 17.3.32929.385
android                     32.0.476/6.0.400      VS 17.3.32929.385

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
danbruccommented, Nov 1, 2022

The ShortName attribute of the <uap:DefaultTile> element in AppxManifest.xml is constraint to at most 40 characters and the MAUI project template sets it to the project name via the <ApplicationTitle> element in the project file which causes this error if the project name is longer than 40 characters.

I ran into the same issue a few days ago when trying MAUI for the first time - created a new MAUI project, picked a long project name, and tried to start [the Windows version, not sure if other platforms are also affected] - the deployment failed. This makes a very unfortunate first impression, even more so as the error message is quite cryptic.

On a related note, going to the MAUI Shared section in the project properties, shortening the Application Title and rebuilding the solution does not reliably fix the issue. The <ApplicationTitle> element in the project file gets updated but AppxManifest.xml retains the old value, at least sometimes. Closing and reopening the solution, then rebuilding seems to fix the problem reliably.

1reaction
mattleibowcommented, Nov 3, 2022

The workaround is in https://github.com/dotnet/maui/issues/10994#issuecomment-1297771073

The ShortName attribute of the uap:DefaultTile element in AppxManifest.xml is constraint to at most 40 characters and the MAUI project template sets it to the project name via the <ApplicationTitle> element in the project file which causes this error if the project name is longer than 40 characters.

Basically, make sure your title is less that 40 characters

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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