maui icon indicating copy to clipboard operation
maui copied to clipboard

DEP0700 ERROR - Registration of the app failed. App manifest validation error...

Open DavorBeg opened this issue 1 year ago • 12 comments

Description

Hello, after I created new MAUI blazor hybrid project in .NET 8, I am not able to build and start the app.

Steps to Reproduce

  1. Create a file > New .NET MAUI APP
  2. Press start (F5) Button with Windows Machine. Visual studio give me this error:
DEP0700: Registration of the app failed. [0x80080204] error 0xC00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 10, Column 13, Reason: 'com.companyname.nis_tt' violates pattern constraint of '[-.A-Za-z0-9]+'.
The attribute 'Name' with value 'com.companyname.nis_tt' failed to parse.		
```	





### Link to public reproduction project repository

_No response_

### Version with bug

8.0.3

### Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

### Last version that worked well

7.0.49

### Affected platforms

Windows

### Affected platform versions

_No response_

### Did you find any workaround?

_No response_

### Relevant log output

_No response_

DavorBeg avatar Dec 12 '23 14:12 DavorBeg

@mattleibow thoughts?

PureWeen avatar Dec 12 '23 19:12 PureWeen

As per the error message, the only accepted charactors are those that match [-.A-Za-z0-9]+

  • hyphen/dash -
  • UPPERCASE letters
  • lowercase letters
  • numbers
  • periods/dots .

You may have had a space in the filename, and this is converted into an underscore.

Duplicate of https://github.com/dotnet/maui/issues/19325

mattleibow avatar Dec 12 '23 20:12 mattleibow

However, I see this is an issue in our updated template processing. @jknaudt21 not sure when you did https://github.com/dotnet/maui/pull/18322 if you found that spaces created an underscore that failed to build on Windows?

mattleibow avatar Dec 12 '23 20:12 mattleibow

@DavorBeg also just to check, does the same thing happen with a regular MAUI project (non-Blazor)?

Eilon avatar Dec 12 '23 20:12 Eilon

@Eilon same issue. I just checked now. @mattleibow You may have had a space in the filename, and this is converted into an underscore. Now I tried with different name like NISTT, same issue..

I tried using .NET 7 and not 8, working without any error on start.

DavorBeg avatar Dec 12 '23 20:12 DavorBeg

What is your error messsage when you have no space in the filename? Can you attach a binlog of your build without a space?

mattleibow avatar Dec 12 '23 20:12 mattleibow

I believe for .NET 7 we always just used a GUID for Application ID which then would not work once you published your app.

mattleibow avatar Dec 12 '23 21:12 mattleibow

Working now, I didnt turn on "developer mode" on my private PC. Must check on laptop tomorrow if it is same issue. On laptop I used NIS-TT for project name. Will try also with NISTT and if everything is working I will close topic. I think primary problem was naming of project! Thank you for support!

DavorBeg avatar Dec 12 '23 21:12 DavorBeg

Conclusion:

  1. On my laptop problem was naming NIS-TT
  2. On my private PC problem was developer mode and naming.

Solution: Turned on developer mode and removed - from my naming.

Thank you all for support!

DavorBeg avatar Dec 13 '23 08:12 DavorBeg

I think this is still supposed to work automatically because the 'invalid characters' should have been converted to valid characters or removed. So there could still be a bug here that we should consider fixing.

I'm glad the workaround worked for you though!

Eilon avatar Dec 13 '23 19:12 Eilon

I am working on a fix here: https://github.com/dotnet/maui/pull/19377 Just writing the tests now as the fix is quite easy, but hopefully will be fixed very soon.

mattleibow avatar Dec 13 '23 21:12 mattleibow

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

ghost avatar Jan 10 '24 16:01 ghost

This seems to still be affecting new projects, even with .NET 8.0.200 and VS 2022 17.9.1.

I've searched all the files where this ID or manifest is, but having no luck. Would it be possible to share how a manual fix could be?

Thanks

Ralms avatar Feb 22 '24 00:02 Ralms

This could be in applicationid in the csproj.

What is the value that you have there?

mattleibow avatar Feb 22 '24 14:02 mattleibow