Macに.net Frameworkのでコンパイラをインストールする
Macに.net Frameworkのでコンパイラをインストールする
Unity製のゲームとかC#で作られたwindows向けアプリの解析をMacでするとき用。
忘れないようにメモ
環境
Mac book pro version 10.15.2
.Net SDKをインストールする
上のリンクからAll .NET Core downloads...
をクリック。
.NET Core 2.1
をダウンロードする
※2.1以外では以下のようなエラーが出る
It was not possible to find any compatible framework version The framework 'Microsoft.NETCore.App', version '2.1.0' was not found. - The following frameworks were found: 3.1.1 at [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
You can resolve the problem by installing the specified framework and/or SDK.
The specified framework can be found at: - https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=2.1.0&arch=x64&rid=osx.10.15-x64
インストールが終わった後に
$ dotnet tool install ilspycmd -g
を叩いてデコンパイラをインストールする。
$ ilspycmd -h dotnet tool for decompiling .NET assemblies and generating portable PDBs Usage: ilspycmd [arguments] [options] Arguments: Assembly file name The assembly that is being decompiled. This argument is mandatory. Options: -h|--help Show help information -o|--outputdir <directory> The output directory, if omitted decompiler output is written to standard out. -p|--project Decompile assembly as compilable project. This requires the output directory option. -t|--type <type-name> The fully qualified name of the type to decompile. -il|--ilcode Show IL code. -d|--debuginfo Generate PDB. -l|--list <entity-type(s)> Lists all entities of the specified type(s). Valid types: c(lass), i(interface), s(truct), d(elegate), e(num) -v|--version Show version of ICSharpCode.Decompiler used. -r|--referencepath <path> Path to a directory containing dependencies of the assembly that is being decompiled. Remarks: -o is valid with every option and required when using -p.
はい