scriptcs makes it easy to write and execute C#, either by using the REPL or your simple text editor. It integrates with NuGet to easily pull down packages for use in your scripts.
Questions tagged [scriptcs]
56 questions
3
votes
2 answers
scriptcs - Unable to read package
I followed a blog post to get scriptcs running in just two steps. Basically, I did this:
@powershell -NoProfile -ExecutionPolicy Unrestricted -Command "iex ((New-Object Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET…

Bob Horn
- 33,387
- 34
- 113
- 219
2
votes
0 answers
Trying to install scriptcs with brew
alessandro@MacBook-Pro ~ % brew install scriptcs
Error: scriptcs: no bottle available!
You can try to install from source with:
brew install --build-from-source scriptcs
Please note building from source is unsupported. You will encounter…

stress
- 95
- 6
2
votes
0 answers
Debugging scriptcs in VS code on Windows
Is it possible to debug scriptcs (in a .csx file) in VS Code on Windows ?
this document describes how to do it on a Mac and using Mono.
this previous question might be relevant to this but has been removed.
The comments on this page from 2 years ago…

guraaku
- 205
- 1
- 7
2
votes
0 answers
How to dynamically create an object from a class defined in a ScriptCS script
I am creating a simple card game and have decided to implement all the individual cards (+ their effects) using scriptcs.
My idea is that the game engine will check what cards are included in the deck, and load the respective script file, which…

user104
- 113
- 1
- 11
2
votes
0 answers
How do I log the Console output of a hosted scriptcs execution?
I am using scriptcs.net to host dynamic scripts, and I would like to capture the output from Console.WriteLine() into my log as information, and Console.Error.WriteLine() as errors. Same as the way Octopus Deploy custom script logging.
The reason I…

jmc
- 1,058
- 1
- 12
- 20
2
votes
1 answer
How to use a custom processor directive in scriptcs?
I've written a custom processor directive for scriptcs based on this answer, but I can't figure out how to make it available for use. I just get the error "Preprocessor directive expected". I'm guessing there's some special way of registering the…

ryan.rousseau
- 1,595
- 1
- 11
- 22
2
votes
3 answers
Add a default using directive to ScriptCS
Is there a way that I can add a default using directive to ScriptCS? So when I start ScriptCS I do not need to include the namespace for classes in that namespace.
For example, I may need to interact with the Process class within the…

Shawn Kendrot
- 12,425
- 1
- 25
- 41
2
votes
2 answers
ScriptCS with Sublime
I'm getting the exception in Sublime:
Unbehandelte Ausnahme: [Decode error - output not cp1252]
by running this code:
Console.WriteLine("fsdfsd")
I installed Sublime Text 2 and 3 by installer and scriptcs by Chocolatey.
Then I added a file with…

user278618
- 19,306
- 42
- 126
- 196
2
votes
1 answer
How to get scriptCs REPL to load config files
Title says most of it. I want the ScriptCs to read my app.config file in my current directory as it would as if this were an exe. I'm not sure it's possible, but if it is, 'how'?
In particular, I would like my connection strings picked up when I…

Jason
- 564
- 6
- 12
1
vote
1 answer
Building scriptcs on Ubuntu 18.04 got errors
How to install scriptcs on Ubuntu 18.04? I've got some build errors.
I'm trying to run c# code using Visual Studio Code on Ubuntu 18.04. I downloaded VScode and installed extensions(C#, C# Extensions, C# XML Documentation Comments, Code Runner). But…

Jaemin Jo
- 45
- 1
- 8
1
vote
2 answers
Why won't System.Data automatically load in scriptcs?
I am trying to use scriptcs 0.17.1 to create a simple script in C#. Here's my script:
using System.Data;
using(var connection = new SqlConnection("constring"))
{
using(var command = new SqlCommand("select GETDATE()", connection))
{
…

mason
- 31,774
- 10
- 77
- 121
1
vote
1 answer
What is the different between scriptcs and roslyn scripting?
I would like to know the difference between Roslyn scripting and scriptcs? I understand that scriptcs is built on top on Roslyn but would like to understand what the extras are that scriptcs providing to me as a developer?

gyurisc
- 11,234
- 16
- 68
- 102
1
vote
1 answer
Getting Parameters in ScriptCS from a .Net Application
I have a little beginner problem with ScriptCS and can't find an answer to this. We want to use ScriptCS to dynamically extend a hosted application. For this we need to pass parameters into the Script and getting values back from the Script. I have…

MelOne
- 11
- 2
1
vote
0 answers
How do I select the Roslyn engine?
I tried out scriptcs on OSX using a script that was previously written for the C# interactive (Roslyn) runtime and it fails with mysterious errors (which I tracked down to being related to C# 6.0 property syntax).
I read that scriptcs should support…

Krumelur
- 31,081
- 7
- 77
- 119
1
vote
2 answers
Can I use nuget packages for octopus scriptcs deploy script?
I would like to use functionality contained in a nuget package in one of my octopus scriptcs deploy scripts. Is this possible, and if so, how?

Chazt3n
- 1,641
- 3
- 17
- 42