Support GitHub Actions annotations for project-level NuGet warnings without line numbers (e.g. NU1506)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 57/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, typescript
Direzione di ricerca
Start by reading the existing .github/csc.json problem matcher and compare its patterns with the NU1506 log examples in this issue. Check how the matcher is registered in the GitHub Actions workflow and inspect related changes from issue #717. Done means a project-level NuGet warning without line or column information produces an annotation associated with its project file.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
actions/setup-dotnet@v5 registers a problem matcher for .NET diagnostics, but some NuGet warnings, such as NU1506, are not recognized and therefore do not appear as GitHub Actions annotations.
For example, the following warnings appear in the build output:
D:\a\WinGetJet\WinGetJet\WinGetJet\WindowsPackageManager.Tests\WindowsPackageManager.Tests.csproj : warning NU1506: Duplicate 'PackageVersion' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageVersion' items are: Microsoft.WindowsPackageManager.ComInterop 1.29.380, Microsoft.WindowsPackageManager.ComInterop 1.29.380.
D:\a\WinGetJet\WinGetJet\WinGetJet\WindowsPackageManager\WindowsPackageManager.csproj : warning NU1506: Duplicate 'PackageVersion' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageVersion' items are: Microsoft.WindowsPackageManager.ComInterop 1.29.380, Microsoft.WindowsPackageManager.ComInterop 1.29.380.
D:\a\WinGetJet\WinGetJet\WinGetJet\WinGetJet\WinGetJet.csproj : warning NU1506: Duplicate 'PackageVersion' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageVersion' items are: Microsoft.WindowsPackageManager.ComInterop 1.29.380, Microsoft.WindowsPackageManager.ComInterop 1.29.380.
These are valid NuGet warnings, but they do not produce annotations in GitHub Actions.
Steps to reproduce
- Configure central package management with duplicate
PackageVersionentries. - Use
actions/setup-dotnet@v5in a GitHub Actions workflow. - Run
dotnet restoreordotnet build. - Observe the
NU1506warnings in the workflow logs.
Expected behavior
NuGet warnings that reference a project file should produce GitHub Actions warning annotations, even when no source line or column information is available.
Actual behavior
The warnings are visible in the workflow logs but are not reported as GitHub Actions annotations.
Possible cause
The existing csc.json problem matcher requires:
- A line number, optionally followed by a column number.
- A trailing project path enclosed in square brackets.
However, project-level NuGet warnings such as NU1506 do not necessarily provide either.
Suggested improvement
Extend the existing problem matcher or register an additional matcher to support .NET/NuGet diagnostics without line and column information.
These diagnostics should still be associated with the referenced project file.
Related issues
- #603 — Add problem matcher for NuGetAudit (closed as not planned)
- #605 — Add msbuild.json as problem matcher (closed without merging)
- #717 — Expand the CSC problem matcher (merged)
Although these address related diagnostic-matching problems, the NU1506 output format is still not supported by the matcher included in setup-dotnet@v5.
Justification
Missing annotations make NuGet warnings harder to discover, especially in large projects where build logs can contain extensive output.
Supporting project-level NuGet diagnostics would improve warning visibility in GitHub Actions job summaries and pull requests without requiring each repository to maintain a custom problem matcher.
- Lingua principale
- TypeScript
- Stelle
- 1.2k
- Fork
- 579
- Merge medio
- 6g 4h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/setup-dotnet
-
rollForward: latestMajor installs the latest LTS SDK even when it is older than sdk.versionForse già presa @kamronbatman l’ha presa 8 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
actions/setup-dotnet#802 · 1 commento · 6 reazioni ·
-
feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
actions/setup-dotnet#801 · 1 commento · 1 reazione ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
actions/setup-dotnet#778 · 3 commenti · 1 reazione ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
actions/setup-dotnet#701 · 3 commenti ·
-
feature request
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 55/100
actions/setup-dotnet#659 · 1 commento · 2 reazioni ·
Tutte le issue di actions/setup-dotnet
Issue simili
-
db-d1-sqlite: upsert is aliased to updateOne, so payload.kv.set never inserts new keysForse già presa @pcbeingused333 l’ha presa oggi. ApertaBug db: d1-sqlite Payload OSS
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
payloadcms/payload#19766 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
device-management-toolkit/sample-web-ui#3711 ·
I maintainer di solito rispondono entro 1 giorno
-
bug impact:low Team: SecuritySolution Team:Defend Workflows v9.6.0
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
elastic/kibana#306401 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
agentes-chat/agentes-chat#927 ·
I maintainer di solito rispondono entro 1 giorno
-
Closing a pinned tab jumps to the Tabs section instead of the next open pinned tabForse già presa @seenimohamed l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ardia-browser/ardia#2769 ·
I maintainer di solito rispondono entro 1 giorno