如何使用.NET Core 2.0 ilasm.exe?

编程入门 行业动态 更新时间:2024-10-22 05:16:07
本文介绍了如何使用.NET Core 2.0 ilasm.exe?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试 https:// www。 nuget/packages/runtime.win-x64.Microsoft.NETCore.ILAsm/ (基于在Win 10 Pro x64 PC上,Microsoft.NETCore.ILAsm中ilasm.exe在哪里?)。没什么事。

I'm trying www.nuget/packages/runtime.win-x64.Microsoft.NETCore.ILAsm/ (upon Where is ilasm.exe in Microsoft.NETCore.ILAsm?) on a Win 10 Pro x64 PC. Nothing happens.

无论我使用什么语法,仍然一无所有。例如。输入的内容不会生成.dll,控制台中也不会打印任何内容。

Whatever syntax I'm using, still nothing. E.g. no .dll is generated from my input and nothing is printed in the console.

即使我只是运行 ilasm(无参数),也不会产生任何输出。它仍然完全保持沉默。同时,如果我运行较旧的C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\ilasm.exe,它将始终产生一些输出(例如,参数用法参考)。

Even if I just run "ilasm" (no parameters), no output is produced. It remains completely silent. At the same time, if I run older C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\ilasm.exe, it always produces some output (for instance, parameter usage reference).

我应该如何将最新的ilasm.exe用于.NET Core 2.0?它有不同的命令行参数吗?或者,也许,我需要一些其他文件才能工作(尽管该软件包除了ilasm.exe本身没有任何意义)?

How am I supposed to use this latest ilasm.exe for .NET Core 2.0? Does it have different command line arguments? Or, maybe, I need some additional files for it to work (although the package didn't have anything meaningful but ilasm.exe itself)?

推荐答案

ILAsm和ILDasm的.NET Core变体取决于为其构建相同CoreCLR版本的构建的核心资产。如果通过依赖关系图还原它们,则依赖于 Microsoft.NETCore.ILAsm 的自包含核心部署应包含目标运行时的所有资产。

The .NET Core variants of ILAsm and ILDasm depend on core assets of the build of the same CoreCLR version they are built for. If they are restored via a dependency graph, a self-contained core deployment depending on Microsoft.NETCore.ILAsm should contain all assets for the target runtime.

获取 ilasm.exe / ildasm.exe 的提取版本若要不执行此操作,您需要将 coreclr.dll 从匹配的核心版本复制到同一目录中。如果是.NET Core 2.0,可以在 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0 中找到此文件。默认位置安装了0个运行时。

To get the extracted version of ilasm.exe / ildasm.exe to work without doing that, you need to copy the coreclr.dll from the matching core version into the same directory. This file can be found in C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.0.0 if a .NET Core 2.0.0 runtime is installed in its default location.

更多推荐

如何使用.NET Core 2.0 ilasm.exe?

本文发布于:2023-11-17 04:52:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1608900.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   NET   Core   exe   ilasm

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!