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
0
votes
1 answer
ConfigurationManager.AppSettings in Roslyn returns an empty string
I'm fully aware this question has been asked multiple time on here, but I have scoured the internet and have yet to find a solution.
I run the following .csx file with scriptcs (just to test and make sure the ConfigurationManager works):
#load…

adefilippo
- 41
- 2
- 6
0
votes
1 answer
How to achieve correctly encoded output with scriptcs?
I'm trying to write cyrillic symbols to output:
// scr.csx
using System;
Console.WriteLine("asd ПРИВЕТ");
But it is not displayed as expected when I run it:
> scriptcs scr
asd ??????
I've tried to save scr.csx in different encodings, it does not…

astef
- 8,575
- 4
- 56
- 95
0
votes
1 answer
scriptcs: how to load a web reference
I have a microsoft reporting server that i'd like to create some scriptcs against.
I know how to do this from within a VS project, by adding a web reference to some resource such as: https://rsdev1.myDomain/RSDEV1/ReportService2005.asmx
How does one…

A MIERS
- 132
- 10
0
votes
1 answer
Location of the script file in ScriptCS
When running a ScriptCS .CSX script, is there a way to get the location of the current script file?

Sean Kearon
- 10,987
- 13
- 77
- 93
0
votes
1 answer
Reading user input from powershell through scriptcs
Here I have a problem to read user inputs from Command prompt or windows powershell through scriptcs.I tried with Console.ReadLine(),Console.Read() or Console.ReadKey() wrapped it around Convert.ToString() to get user response but none of them gives…

boney
- 11
- 5
0
votes
1 answer
scriptcs Mixed mode assembly error
I have added an application in scriptcs and added some references to assemblies which have the version v2.0.50727. So while running the scriptcs file it returns as Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot…

boney
- 11
- 5
0
votes
1 answer
C# Scriptcs module won't load
Hi guys I'm discovering scriptcs modules authoring, I followed the tuto https://github.com/scriptcs/scriptcs/wiki/Modules by letter
and I suppose at the execution time when loading my module to display Hello World as it is discribed in the tuto the…

user2050269
- 81
- 2
- 7
0
votes
1 answer
serialize state of scriptcs (csharp REPL) session for later re-opening
Is it possible to save (serialize) the state of scriptcs session and retrieve (deserialize) it back later on?
This is possible e.g. with dill for python/ipython.

denfromufa
- 5,610
- 13
- 81
- 138
0
votes
2 answers
Unable to use toString() in scriptcs?
This seems like a really silly question, but I'm really stuck, so here goes:
Normally, when I would want to use toString() I would write
int i = 50;
string str = i.toString();
According to .NET Pearls, this is a correct usage. After all, toString()…

radomaj
- 841
- 8
- 18
0
votes
1 answer
What is the $id property shown in ScriptCS when viewing an object in the REPL?
I was playing around with scriptCS and testing some functions in the REPL. I've noticed that when i return a dictionary there is a key value pair of "$id" : "1".
For Example this dictionary:
var types = new Dictionary

Colin Bacon
- 15,436
- 7
- 52
- 72
0
votes
2 answers
Can I access ScriptArgs from a Script Pack?
For ScriptCs scripts I'd like to write a Script Pack that is using command line arguments.
scriptcs myscript.csx -- some args
Within a script I use ScriptArgs, but is it also available somehow from within a Script Pack?

joeriks
- 3,382
- 8
- 32
- 42