samedi 11 février 2023

Introspecting netstandard.dll

I'm trying to introspect types and other info within netstandard.dll

I already had downloaded the nuget package NETStandard.Library 2.0.3 it made a folder in the c drive and one of them contains netstandard.dll which is around 1.3MB and has 100 other odd dlls like mscorlib, System, System.Runtime etc.

I inspected netstandard.dll in Ildasm and found that it had a few namespaces and hundreds of types.

However when I try to load the netstandard.dll using Assembly.LoadFile it tends to load it from another location probably the GAC. And that assembly returns 0 types when calling Assembly.GetTypes

I read elsewhere on this forum that netstandard.dll is a reference type and should never be loaded. How then would be the correct way to get member information from that assembly, I also tried Assembly.ReflectionOnlyLoadFrom however it gave me a error that System.Object could not be found.

The goal is to get api information and documentation of netstandard from the assembly as well as its paired xml file.





Aucun commentaire:

Enregistrer un commentaire