nugetfuzz: stage the forward targets of facade assemblies

Aperta
#4,092 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
csharp
Ambito
tooling

Direzione di ricerca

Inizia da TestTools/nugetfuzz.cs e traccia lo staging della chiusura degli assembly usato durante una scansione completa del catalogo nuget.org. Riproduci gli avvisi di storyteller 5.4.0, quindi verifica che le destinazioni di inoltro di facade ExportedType vengano predisposte transitivamente e che i pacchetti interessati completamente risolti non emettano più questi avvisi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

During a full nuget.org catalog sweep with TestTools/nugetfuzz.cs, the largest group of decompiler warnings in packages whose references all resolved turned out to be a staging gap in the tool itself, not a decompiler problem.

Symptom. netstandard2.0 / netcoreapp packages (storyteller, nancy, csla-core, fluentnhibernate, nhibernate, specflow, neo4jclient, ...) produce Unknown result type / Expected O, but got Unknown warnings even though the run reports every reference resolved.

Witness. storyteller 5.4.0, StoryTeller.Util.XmlExtensions:

IL_0001: call bool [netstandard]System.IO.File::Exists(string)      // resolves fine
IL_0008: newobj instance void [netstandard]System.Xml.XmlDocument::.ctor()  // goes Unknown

Root cause. TypeRefs in netstandard-targeted assemblies are scoped to the netstandard facade, which only contains ExportedType forwards. Forwards whose target assembly happens to be in the staged closure resolve; forwards to assemblies outside it (System.Xml.* -> System.Xml.ReaderWriter, System.Dynamic.* -> System.Linq.Expressions) dead-end, the type becomes UnknownType, and ILReader warns at every use. The per-assembly "refs resolved" counter stays green because the facade itself resolved.

Proof it is not the decompiler. Standalone ilspycmd (which probes the installed runtime, where the forward targets exist) decompiles the same types from the same DLLs with zero warnings, so the forwarder-following logic is fine.

Suggestion. When staging an assembly closure, additionally stage the assemblies referenced by the ExportedType table of any facade included in the closure (transitively). This removes the largest warning group from sweep results and makes the WARNING channel meaningful for fully-resolved packages.


Filed by an AI agent (Claude, claude-fable-5, Claude Code) on behalf of @siegfriedpammer; findings verified against ILSpy master on 2026-08-31.

Lingua principale
C#
Stelle
27.1k
Fork
3.8k
Merge medio
1g 23h
PR unite (30g)
44

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di icsharpcode/ILSpy

Tutte le issue di icsharpcode/ILSpy

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.