Skip to content
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

Check PublicKeyToken before resolving an assembly #24

Merged
merged 1 commit into from
Apr 5, 2018

Conversation

AndyGerlicher
Copy link
Member

  • If there is a request for one of our assemblies with another key do
    not handle the AssemblyResolve event to let other resolvers have a
    chance.

@AndyGerlicher
Copy link
Member Author

@rainersigwald test this please

* If there is a request for one of our assemblies with another key do
not handle the AssemblyResolve event to let other resolvers have a
chance.

Closes microsoft#23
Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked on both of my machines, finding 15.6.1 on my laptop, 15.0 and dogfood 15.7 on my desktop. LGTM.

var sb = new StringBuilder();
foreach (var b in publicKeyToken)
{
sb.Append($"{b:x2}");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ew.

return false;
}

var sb = new StringBuilder();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new StringBuilder(MSBuildPublicKeyToken.Length);

to avoid allocations. Though I guess there'll be garbage strings for each byte later so it probably doesn't matter.

@AndyGerlicher AndyGerlicher merged commit 531e499 into microsoft:master Apr 5, 2018
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.

2 participants