vendredi 15 mai 2020

How to retrieve full assembly name with processor architecture?

I would like to retrieve the full name of an assembly from a System.Reflection.Assembly instance as it appears in references in a .csproj file, e.g.:

Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL

I have tried using FullName and GetName().FullName, but at least in .NET 4.6.2, both of them do not contain the processor archiecture part. (It would obviously be trivial to concatenate the string, but I am looking for the "official" way that automatically applies the "correct" formatting rather than relying on my own code to replicate it.)





Aucun commentaire:

Enregistrer un commentaire