You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 😄
Reacted by Petko At., David Fallah and Pascal Münst
[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.
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.
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.
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?
Reacted by James Burke, Oliver Qin and sugarlemons
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
}
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 ??
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
Reacted by Antonio Coppe and Padmapriya Arasanipalai Kandhadai
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"
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"
Activity
xx5ko commentedon Jan 17, 2017
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
glennblock commentedon Jan 17, 2017
@filipw ?
glennblock commentedon Jan 22, 2017
Most likely this is due to the runner needing to get updated. I'd file a bug in that repo.
xx5ko commentedon Jan 22, 2017
personally, this error does show me after fresh, clean and for first time installation
glennblock commentedon Jan 22, 2017
I am guessing the issue is within the vscode-code-runner and NOT scriptcs itself.
TAGC commentedon Oct 1, 2017
Same happens for me with 0.17.1 via VS Code on High Sierra.
TAGC commentedon Oct 1, 2017
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.
ShiWill commentedon Dec 19, 2017
I have same problem with 0.17.1 via Visual Studio Code on High Sierra 10.13.2
formher commentedon Jun 26, 2018
same here. why is this issue closed? it doesn't seem to have resolution yet.
filipw commentedon Jun 26, 2018
it is closed because the issue is already fixed on the dev branch and will be released with the next release 🙂
formher commentedon Jun 26, 2018
great! and when is the next release planned may I ask?
3 remaining items
shisaq commentedon Aug 7, 2018
The issue stands still...
@filipw I tried your solution, it worked as expected.
The only preparation is to compile the
*.csfile by using$ csc *.csfirst, which will work out a*.exefile to letmonouse it.filipw commentedon Aug 7, 2018
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.
filipw commentedon Aug 9, 2018
this will be addressed in #1289
Jps2310 commentedon Apr 3, 2019
I downloaded the newest version of scriptcs and get the same problem which should be fixed already. I'm working with vscode-code-runner
filipw commentedon Apr 3, 2019
that version with a fix has not been officially released
Jps2310 commentedon Apr 3, 2019
When will it be released?
sballay8734 commentedon Apr 22, 2019
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?
jeffmadison commentedon Jun 21, 2019
For VS Code with the Code Runner extension: open your user settings, switch to JSON mode, then add this:
khaled-zbidat commentedon Nov 7, 2020
hi how can i add to the code runner those lines what is the way ??
AntonioCoppe commentedon Nov 4, 2022
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
zzzkyriez commentedon Jan 19, 2023
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
Umair-max commentedon Jun 24, 2023
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"
BuPo69 commentedon Jul 19, 2023
I've tried to do that and scriptics runs but i dont get any output in terminal when tryna print "hello world"