-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support WhereRefBind log entries #24
Comments
Whoa, great spot. I will have a look at this soon. |
Fusion++ checks if it was able to parse log entries by looking if the corresponding entry has a DisplayName. This is okay for "ordinary" logs like this:
See For Where-Ref binds, there's no DisplayName. That's why Fusion++ sorts them out.
What would you say could be the DisplayName for Where-Ref bindings? |
This is perfect! Thanks so much! |
Version 1.4 was just released 🎉 Thank you for the feedback, Kirill. |
Can someone tell me what "Where-ref bindings" are? Or where can I find some information about it? |
Maybe @davkean knows? |
WhereRef binds are situations where the assembly name hasn't been set; think Assembly.LoadFrom("foo.dll"). |
Thanks @davkean for the explanation. |
Indeed. There are four load contexts (load, load-from, reflection-only, no context). But both Some more info is hidden under the Remarks section here: https://docs.microsoft.com/en-us/dotnet/api/system.reflection.assembly.loadfrom?view=net-6.0#system-reflection-assembly-loadfrom(system-string). |
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:
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)build -bl /p:CreateBootstrap=true
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 NuGetRun 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.
The text was updated successfully, but these errors were encountered: