In .Net Framework the PEVerify determines whether the IL code of a .Net module meets type safety requirements.
What is the equivalent tool in .NET Core that produces the same kind of verification?
The official alternative to PEVerify.exe for .net core apps and beyond is to use ILVerify. You can install it via the command line:
dotnet tool install --global dotnet-ilverify
Sample provided by Microsoft:
dotnet ilverify hello.dll -r "c:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.1.12\*.dll"
Note that unlike PEVerify, you must supply all the references on the command line (including the framework assemblies), so if the assembly you are trying to verify references other assemblies in your project, you'll need to reference those too by adding more -r switches to the command.
Official documentation here
Thanks to Hans Passant for the five year old comment to the question that led me to this solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With