Skip to content

Named argument error #1188

Closed
Closed

Description

@abhi18av

Hi @scriptcs team

I've run into an error with scriptcs while trying it out with the vscode-code-runner and this issue seems to be related with an older version of scriptcs as mentioned in scriptcs-sublime

But I installed the latest version on macOS, brew install scriptcs and I currently have scriptcs 0.16.1 installed. Any idea what might be causing the error?

Happy New Year 😄

Activity

  1. xx5ko commented on Jan 17, 2017

    @xx5ko

    Same problem as well.

    [Running] scriptcs "/Users/chakov/Documents/C#/1.cs"
    Unexpected named argument: Users/chakov/Documents/C#/1.cs
    Usage: scriptcs options

    OPTION DESCRIPTION
    -ScriptName (-script) Script file name, must be specified first
    -Repl (-R) Launch REPL mode when running script. To just launch REPL, simply omit the 'script' argument.
    -Help (-?) Displays help
    -Debug (-D) Emits PDB symbols allowing for attaching a Visual Studio debugger
    -Cache (-C) Flag which determines whether to run in memory or from a .dll
    -LogLevel (-log) Flag which defines the log level used.
    -Install (-i) Installs and restores packages which are specified in packages.config
    -Global (-g) Installs and restores global packages which are specified in packages.config
    -Save (-S) Creates a packages.config file based on the packages directory
    -Clean (-Cl) Cleans installed packages from working directory
    -AllowPreRelease (-pre) Allows installation of packages' prelease versions
    -Version (-V) Outputs version information
    -Watch (-W) Watch the script file and reload it when changed
    -Modules (-M) Specify modules to load
    -Config (-Co) Defines config file name
    -PackageVersion (-P) Defines the version of the package to install. Used in conjunction with -install
    -Output (-O) Write all console output to the specified file

    EXAMPLE: scriptcs server.csx -logLevel debug
    Executes the 'server.csx' script and displays detailed log messages. Useful for debugging.

    [Done] exited with code=1 in 0.397 seconds

  2. glennblock commented on Jan 17, 2017

    @glennblock
    Contributor
  3. glennblock commented on Jan 22, 2017

    @glennblock
    Contributor

    Most likely this is due to the runner needing to get updated. I'd file a bug in that repo.

  4. xx5ko commented on Jan 22, 2017

    @xx5ko

    personally, this error does show me after fresh, clean and for first time installation

  5. glennblock commented on Jan 22, 2017

    @glennblock
    Contributor

    I am guessing the issue is within the vscode-code-runner and NOT scriptcs itself.

  6. TAGC commented on Oct 1, 2017

    @TAGC

    Same happens for me with 0.17.1 via VS Code on High Sierra.

  7. TAGC commented on Oct 1, 2017

    @TAGC

    Same problem occurs if I try to run the command outside of VS Code in a normal terminal. Seems to be an issue with scriptcs, not the code runner.

  8. ShiWill commented on Dec 19, 2017

    @ShiWill

    I have same problem with 0.17.1 via Visual Studio Code on High Sierra 10.13.2

  9. formher commented on Jun 26, 2018

    @formher

    same here. why is this issue closed? it doesn't seem to have resolution yet.

  10. filipw commented on Jun 26, 2018

    @filipw
    Member

    it is closed because the issue is already fixed on the dev branch and will be released with the next release 🙂

  11. formher commented on Jun 26, 2018

    @formher

    great! and when is the next release planned may I ask?

  12. 3 remaining items

  13. shisaq commented on Aug 7, 2018

    @shisaq

    The issue stands still...
    @filipw I tried your solution, it worked as expected.
    The only preparation is to compile the *.cs file by using $ csc *.cs first, which will work out a *.exe file to let mono use it.

  14. filipw commented on Aug 7, 2018

    @filipw
    Member

    I am working on a fix right now. The issue is in the argument parsing library we have, which doesn't work well on Mono. We'll move to a different one as part of 1.0.

  15. filipw commented on Aug 9, 2018

    @filipw
    Member

    this will be addressed in #1289

  16. Jps2310 commented on Apr 3, 2019

    @Jps2310

    I downloaded the newest version of scriptcs and get the same problem which should be fixed already. I'm working with vscode-code-runner

  17. filipw commented on Apr 3, 2019

    @filipw
    Member

    that version with a fix has not been officially released

  18. Jps2310 commented on Apr 3, 2019

    @Jps2310

    When will it be released?

  19. sballay8734 commented on Apr 22, 2019

    @sballay8734

    What are our other options here? I'm a beginner and this has been driving me crazy. I can't get the scripts to run. "Unexpected named argument:" What IDE are you guys using in the meantime?

  20. jeffmadison commented on Jun 21, 2019

    @jeffmadison

    What are our other options here? I'm a beginner and this has been driving me crazy. I can't get the scripts to run. "Unexpected named argument:" What IDE are you guys using in the meantime?

    For VS Code with the Code Runner extension: open your user settings, switch to JSON mode, then add this:

    "code-runner.executorMap": {
          "csharp": "scriptcs -script" // temp workaround until next release. https://github.com/scriptcs/scriptcs/issues/1188#issuecomment-410728346
    }
    
  21. khaled-zbidat commented on Nov 7, 2020

    @khaled-zbidat

    What are our other options here? I'm a beginner and this has been driving me crazy. I can't get the scripts to run. "Unexpected named argument:" What IDE are you guys using in the meantime?

    For VS Code with the Code Runner extension: open your user settings, switch to JSON mode, then add this:

    "code-runner.executorMap": {
          "csharp": "scriptcs -script" // temp workaround until next release. https://github.com/scriptcs/scriptcs/issues/1188#issuecomment-410728346
    }
    

    hi how can i add to the code runner those lines what is the way ??

  22. AntonioCoppe commented on Nov 4, 2022

    @AntonioCoppe

    Stil having the same issue mentioned above, where can i find the user setting where to add:

    "code-runner.executorMap": { "csharp": "scriptcs -script" }

    Thank you

  23. zzzkyriez commented on Jan 19, 2023

    @zzzkyriez

    Stil having the same issue mentioned above, where can i find the user setting where to add:

    "code-runner.executorMap": { "csharp": "scriptcs -script" }

    Thank you

    just resolved the problem.
    go to settings -> extensions -> run code configuration
    then find the ExecutorMap -> edit in json.
    find the line "csharp": "scriptcs" , replace it with "csharp": "scriptcs -script"
    I recommend just // the original line instead delete

  24. Umair-max commented on Jun 24, 2023

    @Umair-max

    for begginners : click on extention icon in vs code and select code runner , beside of uninstall button click on setting icon -> extention setting -> find code runner : executor map then click on edit in setting.json . In line 27 replace this "csharp": "scriptcs" by this "csharp": "scriptcs -script"

  25. BuPo69 commented on Jul 19, 2023

    @BuPo69

    for begginners : click on extention icon in vs code and select code runner , beside of uninstall button click on setting icon -> extention setting -> find code runner : executor map then click on edit in setting.json . In line 27 replace this "csharp": "scriptcs" by this "csharp": "scriptcs -script"

    I've tried to do that and scriptics runs but i dont get any output in terminal when tryna print "hello world"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions