languages | products | page_type | name | urlFragment | description | ||
---|---|---|---|---|---|---|---|
|
|
sample |
Inspect assembly contents using MetadataLoadContext |
inspect-assembly-contents-using-metadataloadcontext |
A sample console application that shows how to use MetadataLoadContext to load an assembly for inspection purposes. |
This sample is a .NET Core console application that loads a specified assembly and prints its custom attributes and defined types. It demonstrates how to use the System.Reflection.MetadataLoadContext API to load an assembly for inspection purposes.
After downloading the source, open a command prompt in the sample directory and enter the following commands:
dotnet build
dotnet run -- <assembly path>