-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
AssemblyNameInfo.FullName does not include public key #102051
Comments
Tagging subscribers to this area: @dotnet/area-system-reflection-metadata |
@adamsitnik I have run into this while working on #102036. I see that you have mentioned this behavior in the documentation, but it is not the behavior that I would expect. Somewhat related to this issue is a problem with conversions of PublicKey to PublicKeyToken. In #102036, I ended up calling into AssemblyName for this conversion in number of places, but it does not look pretty. Would it make sense to have a public API for it? |
IIRC we did not want the Would including Have used it here just to let it be a key in the dictionary (and part of the info was missing) or did you also want to treat two |
I do like that AssemblyNameInfo does not perform any implicit conversions of PublicKey[Token]. I think it is the right design decision. There are situations where one needs to do an explicit PublicKey -> PublicKeyToken conversion. There is no straightforward way to do it. I think we may want to add an API for the explicit conversion.
Yes, I would address the behavior that I did not expect. I assumed that
I have run into several different issues while coding my change. In the specific place you have linked, the missing conversion would just result into inefficiency (much longer public key stored into binary instead of public key token). |
Great, then we agree on the solution. When it comes to the fix I am currently busy with... backporting Full Framework with Security updates and finishing the PayloadReader API. I think I should be able to get back to this in +- 2 weeks. |
@adamsitnik is this still planned for 9.0? |
Yes, thank you for the reminder! I've sent #105649 to address it. |
Repro
Actual result
Expected result
PublicKey (or PublicKeyToken) is included in
AssemblyNameInfo.FullName
The text was updated successfully, but these errors were encountered: