DataTables-Editor-Server Method not found: System.String.Split

DataTables-Editor-Server Method not found: System.String.Split

kevan.watkinskevan.watkins Posts: 18Questions: 4Answers: 0
edited October 6 in Editor

Hello

I require .NET Framework 4.5.1 for OWIN packages I am using.
Should DataTables-Editor-Server work with .NET Framework 4.5.1?

The Demo for .NET Framework 4.5 work perfectly.

I installed DataTables-Editor-Server in my projects via NuGet Package manager
When calling editor.Process(formData) I get the following error:

$exception {"Method not found: 'System.String[] System.String.Split(Char, System.StringSplitOptions)'."} System.MissingMethodException

Is there a way around this without changing the Framework to 4.5?

This question has an accepted answers - jump to answer

Answers

  • kevan.watkinskevan.watkins Posts: 18Questions: 4Answers: 0
    edited October 6

    Hmm, If I change build in Demo project to Target .NET Framework 4.5.1, it works.

  • szxszx Posts: 10Questions: 4Answers: 0
    edited October 9

    I had the same error when calling editor.Process after upgrading Editor from 1.7.4 to 1.8.
    I'm using .NET 4.6.1.

  • kevan.watkinskevan.watkins Posts: 18Questions: 4Answers: 0

    In my project and the working demo project, there are methods for System.String.Split taking the following arguments:

    Split(char[] separator, int count, StringSplitOptions options);
    Split(String[] separator, StringSplitOptions options);
    Split(String[] separator, int count, StringSplitOptions options);
    Split(char[] separator, int count);
    Split(params char[] separator);
    Split(char[] separator, StringSplitOptions options);
    

    Neither have option for Split(Char, StringSplitOptions)

    editor.Process(formData).Data();
    gives System.MissingMethodException: 'Method not found: 'System.String[] System.String.Split(Char, System.StringSplitOptions)'.'

    So where does the demo solution get this method from?

  • kevan.watkinskevan.watkins Posts: 18Questions: 4Answers: 0

    Ah, it works with the DLL from the demo
    Does not work installing via NuGet

  • allanallan Posts: 48,296Questions: 1Answers: 6,969 Site admin

    Ah that's interesting! The NuGet dll targets specifically Framework 4.5 (net45), and I assumed (perhaps incorrectly) that that dll would automatically work with Framework 4.6, 4.7. The demo build is the same though, so I'm not sure why there would be a discrepancy.

    So to reproduce the error, if I create a new project for Framework 4.6 and include the dll from NuGet, it should fail?

    Allan

  • kevan.watkinskevan.watkins Posts: 18Questions: 4Answers: 0

    Hi Allan

    The problem occurs for .NET Framework 4.5
    To replicate, open the demo solution, remove the reference to DataTables-Editor-Server, and Install it via NuGet.

  • SuiteProGSuiteProG Posts: 4Questions: 1Answers: 0

    Hello,

    I have the same problem as Kevan.
    The dll with NuGet packages not work but demo dll works.

    Thanks,

    Charly

  • allanallan Posts: 48,296Questions: 1Answers: 6,969 Site admin
    Answer ✓

    Thank you. I'm afraid this appears to be a packaging error with the Nuget package. 1.8.1 is just around the corner which will address this. Until then, you could grab the dll from the demo, or I can upload a copy here.

    Allan

  • kevan.watkinskevan.watkins Posts: 18Questions: 4Answers: 0

    Thanks for investigating. No problem; we rolled on with a copy of the dll from the demo.

Sign In or Register to comment.