-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix ALC in ProjectReference scenarios #56662
Conversation
src/Compilers/Core/Portable/DiagnosticAnalyzer/DefaultAnalyzerAssemblyLoader.Core.cs
Outdated
Show resolved
Hide resolved
src/Compilers/Core/Portable/DiagnosticAnalyzer/DefaultAnalyzerAssemblyLoader.Core.cs
Show resolved
Hide resolved
writeMethod.Invoke(b, new object[] { sb, "Test G" }); | ||
|
||
var actual = sb.ToString(); | ||
Assert.Equal(@"Delta: Gamma: Test G |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're asking which copy of Delta version 1, right? I think we can check what file paths the assemblies were loaded from using the TestAccessor, but I'd have to check.
("Delta", "1.0.0.0", delta1File.Path), | ||
("Epsilon", "0.0.0.0", epsilonFile.Path) | ||
}, alcs[0].Assemblies.Select(a => (a.GetName().Name!, a.GetName().Version!.ToString(), a.Location)).Order()); | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider extracting a helper method: VerifyLoadContexts(new[] { ("Delta", ..., ...), ("Epsilon", ..., ...) });
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Fixes #56442
cc @jaredpar @chsienki