Skip to content

Conversation

@KevinRansom
Copy link
Contributor

Fixes #8881 and #8743

This occurred because when we load an assembly reference from a local dll we get it including the public key, but when it is an imported assembly ref, it contains just the pktoken. The code that we use to determine reference equality When writing the assembly was using the full PublicKey information, I.e PublicKey and PublicKeyToken. This resulted in references from imported assemblies not matching references from local assemblies.

Anyway the fix was fairly straightforward, always use the public key token for testing assembly equality,

/cc @kerams , @cartermp

@KevinRansom KevinRansom requested a review from TIHan April 16, 2020 19:57
Copy link
Contributor

@TIHan TIHan left a comment

Choose a reason for hiding this comment

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

This looks good to me!

We should always get the right stamp no matter if it was a "PublicKey" or "PublicKeyToken". Very simple.

@kerams
Copy link
Contributor

kerams commented Apr 21, 2020

Still seeing this issue when using a nightly installer (https://aka.ms/dotnet/net5/dev/Sdk/dotnet-sdk-win-x64.exe). Is the fix not included in there?

@brettfo
Copy link
Member

brettfo commented Apr 21, 2020

The fix merged into F# 5 builds in version 11.0.0-beta.20217.1, so anything after that will have it. That build was inserted into the SDK build here. I'm currently trying to track how/where those builds happen to see how far away from the nightly installer it is. I'll keep looking and reply here as soon as I can find it.

@brettfo
Copy link
Member

brettfo commented Apr 21, 2020

Just checked the latest nightly that you mentioned at at the time of this post it only contains F# 20214.4, and build 20217.1 contains this fix. I'm not sure when they promote a new build for download, but I'd keep checking back.

@brettfo
Copy link
Member

brettfo commented Apr 21, 2020

Digging a little more it looks like that SDK build was merged into the installer just an hour ago so I'd expect a new build within a day or so.

@kerams
Copy link
Contributor

kerams commented Apr 22, 2020

Thanks a lot.

nosami pushed a commit to xamarin/visualfsharp that referenced this pull request Feb 23, 2021
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.

Missing method exception, .NET 5

5 participants