ILSpy infelicity with XSharpLanguage plugin

This forum is meant for questions and discussions about the X# language and tools
Post Reply
bugmagnet
Posts: 10
Joined: Tue Oct 25, 2016 7:55 am
Location: Australia

ILSpy infelicity with XSharpLanguage plugin

Post by bugmagnet »

Code: Select all

System.TypeLoadException: Method 'VisitTupleExpression' in type 'ILSpy.XSharpLanguage.XSharpOutputVisitor' from assembly 'ILSpy.XSharpLanguage.Plugin, Version=1.0.1.65534, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at ILSpy.XSharpLanguage.XSharpLanguage.WriteCode(ITextOutput output, DecompilerSettings settings, SyntaxTree syntaxTree, IDecompilerTypeSystem typeSystem)
   at ILSpy.XSharpLanguage.XSharpLanguage.DecompileMethod(MethodDefinition methoddef, ITextOutput output, DecompilationOptions options)
   at ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context, ITextOutput textOutput)
   at ICSharpCode.ILSpy.TextView.DecompilerTextView.<>c__DisplayClass33_0.<DecompileAsync>b__0()
The binary was compiled with .NET 4.7.2 but the same applies to 4.6.1 binaries.

Using

Code: Select all

05/25/2018  11:58 AM            90,112 ILSpy.XSharpLanguage.Plugin.dll
Last edited by Fabrice on Mon Jul 09, 2018 7:52 am, edited 1 time in total.
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

ILSpy infelicity with XSharpLanguage plugin

Post by lumberjack »

Hi Bruce,
bugmagnet wrote:

Code: Select all

   at ICSharpCode.ILSpy.TextView.DecompilerTextView.<>c__DisplayClass33_0.<DecompileAsync>b__0()
I think the problem arise in this line:

Code: Select all

DecompilerTextView.<>c__DisplayClass33_0.<DecompileAsync>b__0()
// Note the .<>c__DisplayClass33_0
Should probably not be too difficult for Fabrice to fix. He need to remove the <> or place the correct Generic type into it.

Regards,
______________________
Johan Nel
Boshof, South Africa
User avatar
Fabrice
Posts: 458
Joined: Thu Oct 08, 2015 7:47 am
Location: France

ILSpy infelicity with XSharpLanguage plugin

Post by Fabrice »

Hi Bruce,

can you give me an access to the Dll/exe that you were trying to decompile, and indicate me where it does crash ?

Thanks
Fab
XSharp Development Team
fabrice(at)xsharp.eu
bugmagnet
Posts: 10
Joined: Tue Oct 25, 2016 7:55 am
Location: Australia

ILSpy infelicity with XSharpLanguage plugin

Post by bugmagnet »

I built a simple HelloWorld which I hope attaches well. Apart from that this is the error message that appeared when I closed ILSpy after selecting the Program node of HelloWorld and then changing the language to XSharp

Bruce.

Code: Select all

System.TypeLoadException: Method 'VisitTupleExpression' in type 'ILSpy.XSharpLanguage.XSharpOutputVisitor' from assembly 'ILSpy.XSharpLanguage.Plugin, Version=1.0.1.65534, Culture=neutral, PublicKeyToken=null' does not have an implementation.
   at ILSpy.XSharpLanguage.XSharpLanguage.TypeToString(ConvertTypeOptions options, TypeReference typeRef, ICustomAttributeProvider typeAttributes)
   at ILSpy.XSharpLanguage.XSharpLanguage.FormatTypeName(TypeDefinition type)
   at ICSharpCode.ILSpy.TreeNodes.TypeTreeNode.get_Text()
   at ICSharpCode.TreeView.SharpTreeNode.ToString()
   at ICSharpCode.ILSpy.MainWindow.GetPathForNode(SharpTreeNode node)
   at ICSharpCode.ILSpy.MainWindow.OnClosing(CancelEventArgs e)
   at System.Windows.Window.WmClose()
   at System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Attachments
HelloWorld.zip
(190.09 KiB) Downloaded 100 times
User avatar
Fabrice
Posts: 458
Joined: Thu Oct 08, 2015 7:47 am
Location: France

ILSpy infelicity with XSharpLanguage plugin

Post by Fabrice »

Hi Bruce,
good catch ! :)
In fact, it appears that you are using the lastest version of ILSpy, right ? ( Version ILSpy version 3.2.0.3856 )

This versions introduced a new member : VisitTupleExpression, which is missing in the current version of the Plugin.

I will correct that asap, and keep you informed.

Fab
XSharp Development Team
fabrice(at)xsharp.eu
User avatar
Fabrice
Posts: 458
Joined: Thu Oct 08, 2015 7:47 am
Location: France

ILSpy infelicity with XSharpLanguage plugin

Post by Fabrice »

Bruce,

I've uploaded a new version of the plugin that support ILSpy Version 3.2.x

Can you please get it and check that it works as expected ?

Thanks.
Fab
XSharp Development Team
fabrice(at)xsharp.eu
FFF
Posts: 1580
Joined: Fri Sep 25, 2015 4:52 pm
Location: Germany

ILSpy infelicity with XSharpLanguage plugin

Post by FFF »

Fabrice,
FYI, the download page still has "Last modified on: 2018-05-04", which is somewhat confusing ;) - inside it has the new dll.
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
bugmagnet
Posts: 10
Joined: Tue Oct 25, 2016 7:55 am
Location: Australia

ILSpy infelicity with XSharpLanguage plugin

Post by bugmagnet »

Okay, working perfectly now.

Thank you very much indeed.

Bruce.
Post Reply