Validate package IDs specified via the #:package directive #47991
Labels
Area-CLI
Area-run-file
Items related to the "dotnet run <file>" effort
untriaged
Request triage from a team member
We should consider improving the validation of the package IDs specified via the
#:package
directive and report an error rather than passing it through to the underlying build. Confusion on what is the correct syntax can make it difficult to diagnose the errors that occur.For example, if a package is specified using the
/
char as the separator between ID and version like#:package System.CommandLine/1.2.3
, the error is difficult to understand asExample/1.2.3
is treated as the package ID:Details on valid package IDs can be found at https://learn.microsoft.com/nuget/reference/nuspec#id
The text was updated successfully, but these errors were encountered: