dotnet / NuGet.BuildTasks

The build tasks used to pick up package content from project.lock.json.
MIT License
44 stars 60 forks source link

Clarify missing RID error #158

Closed JanKrivanek closed 2 months ago

JanKrivanek commented 1 year ago

Context

Current error might get confusing in some cases. Especially when users are trying to st value of RuntimeIdentifiers conditionally based on configurations.

Changes made

Just adjusting the error message - stealing the finding and formulation from @rainersigwald - explicitly mentioning the RuntimeIdentifiers is expected to contain all supported RIDs

rainersigwald commented 1 year ago

I would like this error to have an NUnnnn code with a corresponding details error page, but it doesn't look like any of the errors in this repo have codes, and they all get reported via a catch-all anyway

https://github.com/dotnet/NuGet.BuildTasks/blob/59a160596088e8e8e7256ab3290a6917a4f8d38e/src/Microsoft.NuGet.Build.Tasks/ResolveNuGetPackageAssets.cs#L203-L207

It might even be an improvement to have a single searchable/F1-able code for all ResolveNuGetPackageAssets errors, with a help page that helps disambiguate (since I assume it's nontrivial to get a bunch of unique codes).

If even that is hard, I support either this or appending only a help link that points to a doc page with this info.

JanKrivanek commented 1 year ago

/azp run

azure-pipelines[bot] commented 1 year ago
Azure Pipelines failed to run 1 pipeline(s).
JanKrivanek commented 11 months ago

Closing to rekick the CI

JanKrivanek commented 2 months ago

Feel free to reopen if there is any interest in the change