Skip to content

DIAGNOSTIC (do not merge): assembly bind logging for net472 importer tests - #728

Closed
wasabii wants to merge 1 commit into
mainfrom
diag/fusion-log
Closed

DIAGNOSTIC (do not merge): assembly bind logging for net472 importer tests#728
wasabii wants to merge 1 commit into
mainfrom
diag/fusion-log

Conversation

@wasabii

@wasabii wasabii commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Draft, not for merge. Temporary instrumentation to identify one unknown, then revert.

Why

IKVM.Tools.Importer.Tests on net472 fails every row on main with:

Could not load file or assembly 'System.Collections.Immutable, Version=10.0.0.0' ...
 ---> Could not load file or assembly 'System.Collections.Immutable, Version=8.0.0.0' ...
   at IKVM.Tools.Importer.ImportOptions..ctor()

The generated IKVM.Tools.Importer.Tests.exe.config contains:

<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />

A 10.0.0.0 reference falls outside 0.0.0.0-8.0.0.0, so the redirect never applies and the loader binds 10.0.0.0 literally against a file that really is 8.0.0.0 (FileVersion 8.0.23.53103). That much is confirmed from the run 29223646609 artifact.

The unknown

Nothing I can enumerate explains where the 10.0.0.0 reference comes from. Checked and ruled out:

  • all 68 assemblies in tests/IKVM.Tools.Importer.Tests/net472/ — highest is 8.0.0.0 (IKVM.CoreLib, IKVM.Tools.Importer, System.Reflection.Metadata); the rest ask for 1.2.3.0–6.0.0.0
  • IKVM.Runtime.dll / IKVM.Java.dll — no reference to it at all
  • SDK 10.0.302 TestPlatform / TestHost / diagnostics assemblies — none reference version ≥ 9

The failing run logs WRN: Assembly binding logging is turned OFF., so this turns it on and prints any bind-failure log naming the assembly. That names the requester directly instead of guessing.

Changes

Two steps in the test job, both gated to Windows + IKVM.Tools.Importer.Tests:

  • Enable Assembly Binding Log — sets HKLM\SOFTWARE\Microsoft\Fusion LogFailures/EnableLog with a LogPath under the work dir
  • Dump Assembly Binding Logif: always(), strips HTML and prints matching failure logs to the job output

Once the requester is known, this is reverted and the real fix goes in separately.

Related: this is one of the failures blocking #725, whose own change is correct and adds no failures of its own.

Not for merge. IKVM.Tools.Importer.Tests on net472 fails every row with

  Could not load 'System.Collections.Immutable, Version=10.0.0.0'
   ---> Could not load 'System.Collections.Immutable, Version=8.0.0.0'
  at IKVM.Tools.Importer.ImportOptions..ctor()

The generated app.config redirects 0.0.0.0-8.0.0.0 to 8.0.0.0, so a
10.0.0.0 reference falls outside the range and never gets redirected. The
file on disk really is 8.0.0.0, so the bind fails outright.

Nothing in the test output explains the 10.0.0.0 reference. All 68
assemblies beside the test top out at 8.0.0.0, IKVM.Runtime and IKVM.Java
don't reference it at all, and the SDK's test platform assemblies don't
either. The CI log notes that bind logging is off, so turn it on for this
job and print any failure log mentioning the assembly.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant