Skip to content

Inconsistent error code for NETSDK1174 #22639

@dsplaisted

Description

@dsplaisted

We are using the NETSDK1174 error code for two different things.

How this happened:

  • In Deprecate -p option (in short form) to dotnet run #18301 we added a new warning that comes from the CLI. We wanted a warning code for it, but all of our other warning codes come from SDK tasks. So we inserted a placeholder resource in the SDK tasks (PlaceholderRunCommandProjectAbbreviationDeprecated) to reserve the warning code (which ended up being NETSDK1174.
  • Subsequently, we merged an earlier preview branch into the current 6.0 branch in Merge 6.0.1xx-prev6 to main #18519. Other new error codes had been added in the earlier branch, so this pushed the PlaceholderRunCommandProjectAbbreviationDeprecated error code down to NETSDK1176. However, we didn't notice this, and didn't update the resource in the CLI code that generates this (or in dotnet-watch, which does the same thing).

So now we use NETSDK1174 for two different errors:

  • NETSDK1174: The abbreviation of -p for --project is deprecated. Please use --project.
  • NETSDK1174: Compression in a single file bundle is only supported when publishing a self-contained application.

The first instance is already documented, while it looks like the second one may not be documented. So probably we should change the error code for the second one (resource name CompressionInSingleFileRequiresSelfContained) to use a new error code.

FYI @AntonLapounov @vitek-karas @agocke

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions