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

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

kevan.watkinskevan.watkins Posts: 22Questions: 5Answers: 0
edited October 2018 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: 22Questions: 5Answers: 0
    edited October 2018

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

  • szxszx Posts: 11Questions: 4Answers: 0
    edited October 2018

    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: 22Questions: 5Answers: 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: 22Questions: 5Answers: 0

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

  • allanallan Posts: 49,501Questions: 1Answers: 7,286 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: 22Questions: 5Answers: 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: 22Questions: 2Answers: 0

    Hello,

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

    Thanks,

    Charly

  • allanallan Posts: 49,501Questions: 1Answers: 7,286 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: 22Questions: 5Answers: 0

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

  • szxszx Posts: 11Questions: 4Answers: 0

    I stilll have the same error on 1.8.1 when executing demo solution using NuGet package.

  • drobisondrobison Posts: 1Questions: 0Answers: 0

    Also on 1.8.1 and still experiencing the same problem... I installed via NuGet. FYI

  • dancarterdancarter Posts: 1Questions: 0Answers: 0

    I am also experiencing this issue when using the latest 1.8.1 dll from Nuget. I have gone back to using the 1.8.0 dll from the demo project and it works perfectly.

  • plareszkaplareszka Posts: 11Questions: 4Answers: 2

    still happening with the lates asp.net demo version.... had to use 1.8.0 dll

  • allanallan Posts: 49,501Questions: 1Answers: 7,286 Site admin

    Could you try the dll from the .NET download please?

    Allan

Sign In or Register to comment.