-
Notifications
You must be signed in to change notification settings - Fork 509
How to run ILVerify? #6198
Comments
Run
Once you have done
This is glue between the buildtools build system and regular dotnet build system. This can be deleted once corert is converted to SDK projects (like what was done in dotnet/corefx#29831). |
@jkotas Thanks, that does work. I still think this could be improved, but I understand if it doesn't make sense to work on that if the build system is going to change.
The thing that confused me the most is that the code for that project is literally just |
The glue just needs a dummy program with the right name to publish. The |
(This issue is still open, and the difficulties I'm seeing are similar, so I hope it's okay to add to it.) I'm trying to run ILVerify and just not having any luck getting things to build. I've tried Windows, Mac, and Linux/WSL. On Windows, I'm using VS 2017. I've got the prereqs installed. But just trying to run build.cmd gives me:
This error is the same whether I am using a plain cmd.exe or a Visual Studio command prompt. The init-tools.cmd does seem to work. Once I've done that,
I decided to try Linux/WSL to see if I had more luck there. I got the prereqs installed without incident, But
So I switched to Mac. This one got the closest, as Any tips would be appreciated. Thanks in advance. |
@ericsink, I don't have answers for your build issues, but I just noticed (from here: dotnet/roslyn#22872) that there's a private build NuGet package available of the API: https://dotnet.myget.org/feed/dotnet-core/package/nuget/Microsoft.DotNet.ILVerification. It has the (relatively new) public API described here: #3734 |
ILVerify was moved to dotnet/runtime repo. It is being published as a global tool. dotnet/runtime#35038 (comment) has an example how it works. |
I got a confusing error message when running PEVerify on an assembly, so I wanted to see if ILVerify fared better but I didn't actually manage to run it and my experience along the way was fairly bad. Here's what I did:
Consult the readme. This doesn't help, there is no information about building or running ILVerify there.
Find the right project. Should I use the one in
src/ILVerify/src
or the one insrc/ILVerify/netcoreapp
? The one innetcoreapp
seems to be Hello World, so it must be the one insrc
. Why is the Hello World even there?Attempt to open the solution in VS. This failed with the cryptic "error : Project file is incomplete. Expected imports are missing.".
Attempt to build the solution with
dotnet build
. Got an error that I should runinit-tools.cmd
.Run
init-tools.cmd
and thendotnet build
again, both succeeded. Thoughdotnet build
produced the following confusing warning:Try to run the project with
dotnet run
. Got:Try to directly run the built dll with
dotnet
. Got:Try to run the project in VS. Got:
Try to rename the dll to exe and run it. Got:
Things that I think should be done:
The text was updated successfully, but these errors were encountered: