Skip to content

DEP0600 error when Package name is too long #7059

Open
@mrlacey

Description

@mrlacey

Describe the bug

It's possible to create and run an app within an invalid Package Name, but doing so gives a vague and unhelpful error message that does not point to the cause of the issue:

DEP0600: Deployment failed. Exception - The stub received bad data.
The stub received bad data. [0x800706F7]

The only way round this problem is to use a shorter name.

Steps to reproduce the bug

  1. Create a new app.
  2. Manually edit Package.appxmanifest so it includes a Name that is longer than 50 characters.

e.g.

  <Identity
    Name="Name.That.Is.Very.Long.But.For.Genuinely.Valid.Reasons"
    Publisher="CN=myPublisherName"
    Version="1.0.0.0" />
  1. Run the application.
  2. See the DEP0600 error message (above)

Expected behavior

That the provided value is outside the validation rules, it should be caught at compile time.
A message that explains (or at least references) the problem should be reported. Something like "Package name can be at most 50 characters long."

If this can only be caught at runtime, something more useful than the DEP0600 message should be displayed.

Note. There already is validation for this in the appxmanifest editor (see below) but it is a bad practice to only do input validation (& error reporting) at the point of user input when data can be provided at other times and in other ways.
It's perfectly acceptable to edit the appxmanifest file in other ways (such as notepad!) and this file may not even be opened if the contents are set in another (generated) way (such as with the Community Toolkit, or Template Studio.)

Without providing an error message that points to the actual problem, people may waste days(!) of effort trying to work out the cause of the vague error message that only has an indication of the problem if they know to open the correct file and then go to the correct tab within the UI.

Screenshots

The error validation message in the UI - when it is shown

NuGet package version

WinUI 3 - Windows App SDK 1.0

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

Windows 11 (21H2): Build 22000

Additional context

As a low priority issue, I'm not expecting this will be addressed quickly, but I hope that by documenting the issue here it may help someone else in the future if they search for the error message they will find the solution/work-around.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproduct-winui3WinUI 3 issuesteam-MarkupIssue for the Markup teamwct

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions