Skip to content

Support WhereRefBind log entries #24

@KirillOsenkov

Description

@KirillOsenkov

I've been using Fusion++ today, it's a great tool!

I noticed that it looks like it may not support all entries. Specifically if I run fuslogvw.exe and specify log all binds to disk, I may get files with this format: WhereRefBind!Host=(LocalMachine)!FileName=(Microsoft.Build.NuGetSdkResolver.dll).htm

These don't seem available in Fusion++.

To get a repro:

  1. git clone https://github.com/dotnet/msbuild (assuming you cloned into C:\MSBuild), checkout main as of 2021-03-24 (e.g. dotnet/msbuild@bf0b0c5)
  2. build -bl /p:CreateBootstrap=true
  3. C:\msbuild\artifacts\bin\bootstrap\net472\MSBuild\Current\Bin\MSBuild.exe /r C:\temp\net472\net472.csproj where net472.csproj is any dotnet C# project. Note /r is important as the codepaths involve NuGet

Run step 3 under fuslogvw and Fusion++ and compare the results.

dotnet/msbuild#6289 is the issue we're investigating. Looks like we first load an assembly using Assembly.LoadFrom(), which loads it into the LoadFrom context, then we load the same .dll into the default load context, so we have two copies of the assembly loaded from two different codepaths, then we get the exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions