nugetfuzz: stage the forward targets of facade assemblies

オープン
#4,092 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp
領域
tooling

調査の方向性

TestTools/nugetfuzz.cs から始め、nuget.org カタログ全体のスイープで使用されるアセンブリクロージャのステージングを追跡します。storyteller 5.4.0 の警告を再現し、facade ExportedType の転送先が推移的にステージングされ、影響を受ける完全解決済みパッケージでこれらの警告が発生しなくなることを確認します。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C#
スター
27.1k
フォーク
3.8k
平均マージ
1日 23時間
マージ済み PR(30日)
44

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

icsharpcode/ILSpy のほかの issue

icsharpcode/ILSpy の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。