Get available types in CoreCLR

前端 未结 1 1481
[愿得一人]
[愿得一人] 2020-12-30 07:17

This is easy to get all available types (for some interface for example) in the old .NET, but I can\'t find the way how to do that in the new CoreCLR.

What I want to

相关标签:
1条回答
  • 2020-12-30 07:56

    So, here is the answer from Microsoft: https://github.com/dotnet/coreclr/issues/919

    In short, there is new

    Microsoft.Framework.Runtime.LibraryManager
    

    with

    public IEnumerable<ILibraryInformation> GetLibraries();
    public IEnumerable<ILibraryInformation> GetReferencingLibraries(string name);
    

    etc

    UPD: starting from RC2 use Microsoft.Extensions.DependencyModel.DependencyContext instead:

    DependencyContext.Default.CompileLibraries
    DependencyContext.Default.RuntimeLibraries
    
    0 讨论(0)
提交回复
热议问题