Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8812289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:34:19+00:00 2026-06-14T03:34:19+00:00

I added reference of Script# to my standart console application. After that I was

  • 0

I added reference of Script# to my standart console application. After that I was trying to invoke some method from there but was getting the following error:

MissingMethodException

I suppose it happened on the following line:

string[] lines = s.Split(';');

My assumption is that usual mscorlib library has not method public string[] Split(char separator), but has public string[] Split(params char[] separator)

Is it possible to write valid code with such string operations both for a Script# project and for a standart C# .NET project? Due to this problem I have to write duplicate code for both projects with minimal difference.

P.S. I tried to use assemblty binding redirects, as discussed in this SO question, but it didn’t help me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T03:34:20+00:00Added an answer on June 14, 2026 at 3:34 am

    I found solution!

    My sequence of actions:

    1. Create Split method of string splitting in any Script# class.

    2. Define conditional compilation symbol DOTNET in your .NET project.

    3. Add As Link file with Split method from Script# to .NET project and also add as link another necessary dependent files.

    public static string[] Split(string str, string separator)
    {
        string[] result;
    #if DOTNET
        result = str.Split(new string[] { separator }, System.StringSplitOptions.None);
    #else
        result = str.Split(separator);
    #endif
        return result;
    }
    

    After that appropriate code will be selected dependent on DOTNET symbol, which defined only in .NET project. Other similar methods, not only with strings, can be rewritten in the same way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to get my PDE build script to invoke my customBuildCallbacks.xml. I've added
I've added the reference to System.Runtime.Serialization dll to my project but still can't find
I've made a simple .NET 4 Web Application in VS2010, and added a reference
I'm writing a script that makes some trivial changes and then commits them to
How can I add reference to an external assembly from within a script task
My Mac OS application links with a non-system-provided framework Foo.framework. I added a reference
I'm working on a PHP script that updates some tracking numbers based on an
I have added a service reference to my asp.net web application (originally it was
I'm trying to use a web service and thus added a web service reference
I have MapPoint 2009 installed and added a reference to the Microsoft MapPoint 16.0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.