Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is the PEVerify equivalent in.NET Core for Mac and Linux?

Tags:

.net

.net-core

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?

like image 252
Miguel Gamboa Avatar asked Dec 21 '25 07:12

Miguel Gamboa


1 Answers

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.

like image 93
Kirk Woll Avatar answered Dec 24 '25 00:12

Kirk Woll



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!