maui icon indicating copy to clipboard operation
maui copied to clipboard

Unable to start program debug

Open Mapaler opened this issue 6 months ago • 4 comments

Problem encountered on https://dotnet.microsoft.com/zh-cn/learn/maui/first-app-tutorial/run Operating System: windows 10 [10.0.19045.3803]

Following the tutorial, a new program called "Auto Login" was created. devenv_8y86EgAQh2

After clicking "Windows Machine", the prompt indicates that need to deploy before debug. devenv_Clo73p5Wut

The following message appears in the error list

DEP0700: 应用程序注册失败。[0x80080204] 错误 0xC00CE169: 应用部件清单(manifest)验证错误: 根据架构,应用部件清单必须是有效的: 行: 10,列: 13,原因: 'com.companyname.auto_login' 违反了 '[-.A-Za-z0-9]+' 的 pattern 约束。无法分析值为 'com.companyname.auto_login' 的属性 'Name'。 Auto Login

devenv_MmBJr2t5YG

I tried changing the package name in AndroidManifest.xml. But nothing has changed, and the error is still there. devenv_hHF7MEr4PZ

Mapaler avatar Jan 05 '24 11:01 Mapaler

Hi there. We are going to need more information, preferably in english language. Please provide us the output logs so that we can further help you !

Cheers, TD

SupermindPT avatar Jan 07 '24 16:01 SupermindPT

  1. Create new MAUI APP
    devenv_9pBeDAfCMT

  2. Named "test app"
    devenv_N9yZ7kce9K

  3. Choose .NET 8 devenv_ynwMYmmszo

  4. Run "Windows Machine" devenv_gfWYAVyNow I changed my display language and Visual Studio language to English, but the Error inform is also Chinese.

    Error DEP0700: Registration of the app failed. [0x80080204] 错误 0xC00CE169: 应用部件清单(manifest)验证错误: 根据架构,应用部件清单必须是有效的: 行: 10,列: 13,原因: 'com.companyname.test_app' 违反了 '[-.A-Za-z0-9]+' 的 pattern 约束。
    无法分析值为 'com.companyname.test_app' 的属性 'Name'。

    And output is

    Creating a new clean layout... Copying files: Total 38 mb to layout... Checking whether required frameworks are installed... Registering the application to run from layout... DEP0700: Registration of the app failed. [0x80080204] 错误 0xC00CE169: 应用部件清单(manifest)验证错误: 根据架构,应用部件清单必须是有效的: 行: 10,列: 13,原因: 'com.companyname.test_app' 违反了 '[-.A-Za-z0-9]+' 的 pattern 约束。 无法分析值为 'com.companyname.test_app' 的属性 'Name'。

    ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Build completed at 10:17 PM and took 09.977 seconds ========== ========== Deploy: 1 succeeded, 0 failed, 0 skipped ========== ========== Deploy completed at 10:17 PM and took 09.978 seconds ==========

  5. I tested both "test_app" and "test-app" also had the same error, only "testapp" worked fine devenv_riOYfavz1r devenv_XnRc5id5lF testapp_aGKwhy61uR

Mapaler avatar Jan 11 '24 14:01 Mapaler

Right click on the solution -> Configuration Manager -> Enable Deploy on startup project

SupermindPT avatar Jan 11 '24 14:01 SupermindPT

I't checked.
devenv_4EfR2fklpw

Translate the error into English. I think the problem is that the special character in the package name is converted to "_", but it is not allowed in the name rules.

Error 0xC00CE169: Application manifest validation error: Depending on the schema, the application manifest must be valid: row: 10, column: 13, reason: 'com.companyname.test_app' violates '[-. A-Za-z0-9]+'. Unable to parse attribute 'Name' with value 'com.companyname.test_app'.

So I tested both "test_app" and "test-app" also had the same error, but "testapp" worked fine.

devenv_riOYfavz1r

devenv_XnRc5id5lF

testapp_aGKwhy61uR

Mapaler avatar Jan 11 '24 14:01 Mapaler

Thanks for the issue report @Mapaler! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.

If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.

  1. Go to the Visual Studio for Windows feedback tool or Visual Studio for Mac feedback tool to report the issue
  2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.