简体   繁体   中英

How to use executable file from .Net Core nuget package?

I'm currently trying to integrate the ILDAsm package in my .Net Core project that contains the executable file ildasm.exe which I want to call from my application. The nuget package is explicitly made for .Net Core and all runtimes (linux, windows, osx, etc.). Obviously no reference is added to my project after installing the package, but I also have no idea what I have to do to use the package (what is/will be the path of ildasm.exe ?).

Just to be clear, I want to use the executable file from my code when my application is running and not on build.

There is an open GitHub issue about providing ildasm with the .NET Core SDK.

The Microsoft.NETCore.ILDAsm NuGet package contains a runtime.json file but no binaries.

This runtime.json file refers to several runtime NuGet packages that contain native versions of ildasm for the different platforms. On the Mac if you install runtime.osx-x64.Microsoft.NETCore.ILDAsm into your project you can then run ildasm from the command if the full path is used:

~/.nuget/packages/runtime.osx-x64.microsoft.netcore.ildasm/2.0.3/runtimes/osx-x64/native/ildasm

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM