We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add-Type -TypeDefinition @" public static class HelloWorld { public static void Main() => "Hello World!".Say(); static void Say(this string msg) => System.Console.WriteLine("Hello, World!"); } "@ -OutputAssembly "HelloWorld.dll"
#r "nuget: ICSharpCode.Decompiler, 9.0.0.7833-preview3" using ICSharpCode.Decompiler; using ICSharpCode.Decompiler.CSharp; DecompilerSettings s = new(){ ExtensionMethods = false }; var dll = "HelloWorld.dll"; return new CSharpDecompiler(dll, s).DecompileWholeModuleAsString();
using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] public static class HelloWorld { public static void Main() { "Hello World!".Say(); } private static void Say(this string msg) { Console.WriteLine("Hello, World!"); } }
#3356 this above commit solved it.
using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; [assembly: Extension] [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] [Extension] public static class HelloWorld { public static void Main() { Say("Hello World!"); } [Extension] private static void Say(string msg) { Console.WriteLine("Hello, World!"); } }
The text was updated successfully, but these errors were encountered:
2f53f69
Merge pull request #3356 from naratteu/master
d0eeef4
Fix #3355 : Insert missing DecompilerSettings
No branches or pull requests
Input code
Erroneous output
Correct output
#3356
this above commit solved it.
The text was updated successfully, but these errors were encountered: