Skip to content
This repository was archived by the owner on Nov 13, 2026. It is now read-only.

Always use PublicKeyToken in metadata transform instead of PublicKey - #1098

Merged
davidwrighton merged 1 commit into
dotnet:masterfrom
davidwrighton:always_use_public_key_token
Apr 7, 2016
Merged

davidwrighton merged 1 commit into
dotnet:masterfrom
davidwrighton:always_use_public_key_token

Conversation

@davidwrighton

Copy link
Copy Markdown
Member

While a PublicKey is a valid representation in a reference, its rarely/never desireable. PublicKeyTokens are all that are expected to be present during assembly resolution, and thus resolution algorithms ignore the extra data encoded in a PublicKey as opposed to a PublicKeyToken, and actually must perform conversion to a PublicKeyToken to function which can be costly.

While a PublicKey is a valid representation in a reference, its rarely/never desireable. PublicKeyTokens are all that are expected to be present during assembly resolution, and thus resolution algorithms ignore the extra data encoded in a PublicKey as opposed to a PublicKeyToken, and actually must perform conversion to a PublicKeyToken to function which can be costly.
@davidwrighton

Copy link
Copy Markdown
Member Author

@MichalStrehovsky PTAL

@MichalStrehovsky

Copy link
Copy Markdown
Member

LGTM

@davidwrighton
davidwrighton merged commit 81a4e4d into dotnet:master Apr 7, 2016
@davidwrighton
davidwrighton deleted the always_use_public_key_token branch May 10, 2017 22:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants