@ -4,6 +4,8 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"You must install **.NET Interactive Notebooks** extension in VS Code to run this notebook!\n",
"\n",
"Load the NuGet package and print out the version to make sure we are using the latest and greatest"
"Load the NuGet package and print out the version to make sure we are using the latest and greatest"
]
]
},
},
@ -18,19 +20,23 @@
"outputs": [
"outputs": [
{
{
"data": {
"data": {
"text/plain": "Installed package ICSharpCode.Decompiler version 7.0.0.6488"
"text/html": [
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>ICSharpCode.Decompiler, 7.2.0.6702-preview2</span></li></ul></div></div>"
]
},
},
"output_type": "unknown"
"metadata": {},
"output_type": "display_data"
},
},
{
{
"data": {
"name": "stdout",
"text/plain": "ICSharpCode.Decompiler, Version=7.0.0.6488, Culture=neutral, PublicKeyToken=d4bfe873e7598c49\r\n"
"output_type": "stream",
},
"text": [
"output_type": "unknown"
"ICSharpCode.Decompiler, Version=7.2.0.6702, Culture=neutral, PublicKeyToken=d4bfe873e7598c49\r\n"
]
}
}
],
],
"source": [
"source": [
"#r \"nuget: ICSharpCode.Decompiler, 7.0.0.6488 \"\n",
"#r \"nuget: ICSharpCode.Decompiler, 7.2.0.6702-preview2 \"\n",
"\n",
"\n",
"using System.Reflection.Metadata;\n",
"using System.Reflection.Metadata;\n",
"using ICSharpCode.Decompiler;\n",
"using ICSharpCode.Decompiler;\n",
@ -45,7 +51,7 @@
"cell_type": "markdown",
"cell_type": "markdown",
"metadata": {},
"metadata": {},
"source": [
"source": [
"You must have compiled **frontends.sln ** first (run “dotnet build” in ICSharpCode.Decompiler.PowerShell folder). Make sure to modify **basePath** to your repository path."
"You must have compiled **ILSpy.XPlat.slnf ** first (run “dotnet build” in ICSharpCode.Decompiler.PowerShell folder). Make sure to modify **basePath** to your repository path."
]
]
},
},
{
{
@ -81,10 +87,11 @@
},
},
"outputs": [
"outputs": [
{
{
"data": {
"name": "stdout",
"text/plain": "1461\r\n"
"output_type": "stream",
},
"text": [
"output_type": "unknown"
"1478\r\n"
]
}
}
],
],
"source": [
"source": [
@ -109,10 +116,20 @@
},
},
"outputs": [
"outputs": [
{
{
"data": {
"name": "stdout",
"text/plain": "using System;\r\n\r\nnamespace ICSharpCode.Decompiler.Util\r\n{\r\n\tpublic static class Empty<T>\r\n\t{\r\n\t\tpublic static readonly T[] Array = System.Array.Empty<T>();\r\n\t}\r\n}\r\n\r\n"
"output_type": "stream",
},
"text": [
"output_type": "unknown"
"using System;\r\n",
"\r\n",
"namespace ICSharpCode.Decompiler.Util\r\n",
"{\r\n",
"\tpublic static class Empty<T>\r\n",
"\t{\r\n",
"\t\tpublic static readonly T[] Array = System.Array.Empty<T>();\r\n",
"\t}\r\n",
"}\r\n",
"\r\n"
]
}
}
],
],
"source": [
"source": [
@ -138,10 +155,30 @@
},
},
"outputs": [
"outputs": [
{
{
"data": {
"name": "stdout",
"text/plain": "using System;\r\n\r\nstatic UniversalAssemblyResolver()\r\n{\r\n\tgac_paths = GetGacPaths();\r\n\tZeroVersion = new Version(0, 0, 0, 0);\r\n\tif (Type.GetType(\"Mono.Runtime\") != null)\r\n\t{\r\n\t\tdecompilerRuntime = DecompilerRuntime.Mono;\r\n\t}\r\n\telse if (typeof(object).Assembly.GetName().Name == \"System.Private.CoreLib\")\r\n\t{\r\n\t\tdecompilerRuntime = DecompilerRuntime.NETCoreApp;\r\n\t}\r\n\telse if (Environment.OSVersion.Platform == PlatformID.Unix)\r\n\t{\r\n\t\tdecompilerRuntime = DecompilerRuntime.Mono;\r\n\t}\r\n}\r\n\r\n"
"output_type": "stream",
},
"text": [
"output_type": "unknown"
"using System;\r\n",
"\r\n",
"static UniversalAssemblyResolver()\r\n",
"{\r\n",
"\tgac_paths = GetGacPaths();\r\n",
"\tZeroVersion = new Version(0, 0, 0, 0);\r\n",
"\tif (Type.GetType(\"Mono.Runtime\") != null)\r\n",
"\t{\r\n",
"\t\tdecompilerRuntime = DecompilerRuntime.Mono;\r\n",
"\t}\r\n",
"\telse if (typeof(object).Assembly.GetName().Name == \"System.Private.CoreLib\")\r\n",
"\t{\r\n",
"\t\tdecompilerRuntime = DecompilerRuntime.NETCoreApp;\r\n",
"\t}\r\n",
"\telse if (Environment.OSVersion.Platform == PlatformID.Unix)\r\n",
"\t{\r\n",
"\t\tdecompilerRuntime = DecompilerRuntime.Mono;\r\n",
"\t}\r\n",
"}\r\n",
"\r\n"
]
}
}
],
],
"source": [
"source": [
@ -189,58 +226,19 @@
},
},
"outputs": [
"outputs": [
{
{
"data": {
"name": "stdout",
"text/plain": "Microsoft\r\n"
"output_type": "stream",
},
"text": [
"output_type": "unknown"
"Microsoft\r\n",
},
"System\r\n",
{
"LightJson\r\n",
"data": {
"Humanizer\r\n",
"text/plain": "System\r\n"
"ICSharpCode\r\n",
},
"FxResources\r\n",
"output_type": "unknown"
"Internal\r\n",
},
"MS\r\n",
{
"Windows\r\n"
"data": {
]
"text/plain": "LightJson\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "Humanizer\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "ICSharpCode\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "FxResources\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "Internal\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "Windows\r\n"
},
"output_type": "unknown"
},
{
"data": {
"text/plain": "MS\r\n"
},
"output_type": "unknown"
}
}
],
],
"source": [
"source": [
@ -265,10 +263,11 @@
},
},
"outputs": [
"outputs": [
{
{
"data": {
"name": "stdout",
"text/plain": "LightJson.JsonArray\r\n"
"output_type": "stream",
},
"text": [
"output_type": "unknown"
"LightJson.JsonArray\r\n"
]
}
}
],
],
"source": [
"source": [
@ -304,4 +303,4 @@
},
},
"nbformat": 4,
"nbformat": 4,
"nbformat_minor": 4
"nbformat_minor": 4
}
}