At SWFox you showed a trick to convert C# examples to X#. I should have written it down--what was it?
Thanks,
Eric
C# Samples to X#
C# Samples to X#
Eric,
- Download the X# language addin for ILSpy from this website
- Compile the C# code
- Open the assembly in ILSpy
- Set the language to X#
Robert
- Download the X# language addin for ILSpy from this website
- Compile the C# code
- Open the assembly in ILSpy
- Set the language to X#
Robert
XSharp Development Team
The Netherlands
robert@xsharp.eu
The Netherlands
robert@xsharp.eu
- Eric Selje
- Posts: 31
- Joined: Sun Sep 22, 2019 3:16 pm
C# Samples to X#
Ah, that's it thanks! I'll give it a try...
C# Samples to X#
Robert,
I downloaded the ILSpy project and compiled its solution, then copied the ILSpy.XSharpLanguage.Plugin.dll to ILSpy.exe directory.
When I run the ILSpy.exe, I am getting an error that it cannot find: ICSharpCode.AvalonEdit.
I have no issues using C# language options.
Using ILSpy.XSharpLanguage.Plugin.dll version 1.3.65534
Any ideas how to resolve the issue?
Error log:
System.IO.FileLoadException: Could not load file or assembly 'ICSharpCode.AvalonEdit, Version=6.0.253.0, Culture=neutral, PublicKeyToken=9cc39be672370310' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'ICSharpCode.AvalonEdit, Version=6.0.253.0, Culture=neutral, PublicKeyToken=9cc39be672370310'
at ILSpy.XSharpLanguage.XSharpHighlightingTokenWriter..ctor(TokenWriter decoratedWriter, ISmartTextOutput textOutput, XSharpOptions settings)
at ILSpy.XSharpLanguage.XSharpLanguage.WriteCode(ITextOutput output, DecompilerSettings settings, SyntaxTree syntaxTree, IDecompilerTypeSystem typeSystem)
at ILSpy.XSharpLanguage.XSharpLanguage.DecompileMethod(IMethod methoddef, ITextOutput output, DecompilationOptions options)
at ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context, ITextOutput textOutput) in C:UsersJamalDownloadsILSpy-masterILSpyTextViewDecompilerTextView.cs:line 763
at ICSharpCode.ILSpy.TextView.DecompilerTextView.<>c__DisplayClass47_0.<DecompileAsync>b__0() in C:UsersJamalDownloadsILSpy-masterILSpyTextViewDecompilerTextView.cs:line 745
I downloaded the ILSpy project and compiled its solution, then copied the ILSpy.XSharpLanguage.Plugin.dll to ILSpy.exe directory.
When I run the ILSpy.exe, I am getting an error that it cannot find: ICSharpCode.AvalonEdit.
I have no issues using C# language options.
Using ILSpy.XSharpLanguage.Plugin.dll version 1.3.65534
Any ideas how to resolve the issue?
Error log:
System.IO.FileLoadException: Could not load file or assembly 'ICSharpCode.AvalonEdit, Version=6.0.253.0, Culture=neutral, PublicKeyToken=9cc39be672370310' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'ICSharpCode.AvalonEdit, Version=6.0.253.0, Culture=neutral, PublicKeyToken=9cc39be672370310'
at ILSpy.XSharpLanguage.XSharpHighlightingTokenWriter..ctor(TokenWriter decoratedWriter, ISmartTextOutput textOutput, XSharpOptions settings)
at ILSpy.XSharpLanguage.XSharpLanguage.WriteCode(ITextOutput output, DecompilerSettings settings, SyntaxTree syntaxTree, IDecompilerTypeSystem typeSystem)
at ILSpy.XSharpLanguage.XSharpLanguage.DecompileMethod(IMethod methoddef, ITextOutput output, DecompilationOptions options)
at ICSharpCode.ILSpy.TextView.DecompilerTextView.DecompileNodes(DecompilationContext context, ITextOutput textOutput) in C:UsersJamalDownloadsILSpy-masterILSpyTextViewDecompilerTextView.cs:line 763
at ICSharpCode.ILSpy.TextView.DecompilerTextView.<>c__DisplayClass47_0.<DecompileAsync>b__0() in C:UsersJamalDownloadsILSpy-masterILSpyTextViewDecompilerTextView.cs:line 745
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
C# Samples to X#
Hi Jamal,
You need the correct version of the Language Plugin with each ILSpy version.Jamal wrote: Using ILSpy.XSharpLanguage.Plugin.dll version 1.3.65534
Any ideas how to resolve the issue?
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
C# Samples to X#
Hi Jamal,
I´m using the 5.0 ilspy binaries dated 19 Sep, the dll from the ILSpy5.XSharpLanguage.zip and all works as expected.
https://github.com/icsharpcode/ILSpy/re ... 0.5124.zip
regards
Karl-Heinz
I´m using the 5.0 ilspy binaries dated 19 Sep, the dll from the ILSpy5.XSharpLanguage.zip and all works as expected.
https://github.com/icsharpcode/ILSpy/re ... 0.5124.zip
regards
Karl-Heinz
C# Samples to X#
Hi Jamal,
strangely the V5.0 is build against AvalonEdit 6.0.253...So, this is the one I use too
and V5.0.2 is using AvalonEdit 6.0.0... That's why the Plugin is crashing with this version.
HTH,
Fabrice
strangely the V5.0 is build against AvalonEdit 6.0.253...So, this is the one I use too
and V5.0.2 is using AvalonEdit 6.0.0... That's why the Plugin is crashing with this version.
HTH,
Fabrice
XSharp Development Team
fabrice(at)xsharp.eu
fabrice(at)xsharp.eu
C# Samples to X#
Hi Guys,
The ILSpy version mentioned by Karl-Heinz worked fine.
Thanks!
Jamal
The ILSpy version mentioned by Karl-Heinz worked fine.
Thanks!
Jamal
C# Samples to X#
Hi Fabrice,
Initially I added ILSpy as an extension from within VS 2019 and after some digging I found the cryptic folder name which VS added the extension in. Then I was looking for how to add the X# plugin from ILSpy, and was found. Then used the easier method of downloading the ILSpy master file and created the EXE, then Karl's post helped resolve the issue.
To make the long story short, I suggest you create within the X# zip file, a readme file on the proper procedure to make the X# plugin available in ILSpy and a link to the correct versions to use.
Initially I added ILSpy as an extension from within VS 2019 and after some digging I found the cryptic folder name which VS added the extension in. Then I was looking for how to add the X# plugin from ILSpy, and was found. Then used the easier method of downloading the ILSpy master file and created the EXE, then Karl's post helped resolve the issue.
To make the long story short, I suggest you create within the X# zip file, a readme file on the proper procedure to make the X# plugin available in ILSpy and a link to the correct versions to use.