小编pun*_*une的帖子

如何在 .Net core exe/assembly 上运行 ildasm?

我正在尝试针对 .NetCore3.1 控制台应用程序运行作为 Visual Studio 2019 的一部分安装的 ildasm(中级语言反汇编程序)。

使用 Visual Studio 2019 的开发人员命令提示符并运行以下命令

ildasm.exe D:\DotNet\IntroductionToCsharp\IntroductionToCsharp\bin\Debug\netcoreapp3.1\IntroductionToCsharp\bin\Debug\netcoreapp3.1\IntroductionToCsharp.exe

但出现以下错误:

'D:\DotNet\IntroductionToCsharp\IntroductionToCsharp\bin\Debug\netcoreapp3.1\IntroductionToCsharp.exe' 没有有效的 CLR 标头,无法反汇编

此文件夹内容

注意:在非 Core (.Net Framework 4.x) exe 上运行相同的命令可以正常工作。也许在 .Net Core 中查看 IL 需要一些特殊的东西?

.net c# ildasm .net-core

4
推荐指数
1
解决办法
1614
查看次数

标签 统计

.net ×1

.net-core ×1

c# ×1

ildasm ×1