Questions tagged [cs-script]

CS-Script is a CLR (Common Language Runtime) based scripting system which uses ECMA-compliant C# as a programming language. CS-Script currently targets Microsoft's implementation of CLR and has full support on Mono.

39 questions
1
vote
0 answers

C#7 support using CodeDom evaluator in CS-Script

I am developing an application which requires a dynamic scripting system. I am using CS-Script to host the script execution. I would like to use C#7 features in the scripts (i.e. local methods) but cannot as the CodeDom evaluator engine does not…
rodit
  • 1,746
  • 2
  • 19
  • 33
1
vote
0 answers

C# exception, "The given path's format is not supported."

I'm using CS-Script to compile it, and it compiled fine after I fixed all the syntax errors. I compiled it to a console application executable. Unhandled Exception: System.NotSupportedException: The given path's format is not supported. at…
ZJohnsonPest
  • 11
  • 1
  • 3
1
vote
0 answers

can't load System.Reflection.Metadata, Version=1.2.0.0

I create service with wcf public interface IScriptService { [OperationContract] string ExecuteScript(string code); [OperationContract] string GetString(string code); // Method for test service } public class ScriptService :…
itihonov
  • 81
  • 1
  • 7
1
vote
0 answers

Getting CefSharp to play nice with CSScript

I have an application that uses a CefSharp.OffScreen browser to do a bit of scraping work. It runs in a scripting environment using CSScript to execute a dynamically-loaded class that calls CefSharp to do the work. CefSharp works perfectly fine in…
Robert Harvey
  • 178,213
  • 47
  • 333
  • 501
1
vote
2 answers

Why am I having an error trying to locally install cs-script?

You download CS-Script package from the site The installation instructions say to unzip the file where you want and then run css_config.exe to install the package. But if you run a later version of .NET, you'll likely see a message box that says…
Axeman
  • 29,660
  • 2
  • 47
  • 102
1
vote
0 answers

Add reference to the calling application in CS-Script

I have a tool written in C# that used to work (I didn't write it). What it does is basically run C# scripts using CS-Script. This scripts can use references to DLLs and EXEs (I think) by using the directive: //css_reference library.dll; My…
shwartz
  • 631
  • 3
  • 13
  • 29
0
votes
1 answer

CS-Script and Entity Framework

I am editing an open source application to change the database accessing (SQLite) from a single user application to a multi-user application and I have employed Entity Framework and Linq to achieve this. My problem is that this is a very large…
0
votes
0 answers

CSScript Recompile?

I'm adding VB.Net scripting to a C# application. How can I recompile a script using CS Script? In the C# backend, I add the script code like this: public static string AddGlobalCode(string code) { // Wrap the user's code in some boilerplate …
001
  • 13,291
  • 5
  • 35
  • 66
0
votes
0 answers

Better to filter in datatable, or in SQL query?

I have a list of values of type string, I am currently looping over this and using it in the "WHERE" of many 1000's of SQL queries, I was wondering if I should run one query and do the filtering in the resulting datatable. I have already implemented…
0
votes
1 answer

C# and CS-Script: variables not in context

[C# newbie] Hi. This is a test of CS-Script 3.28.7, to add scripting to C#. I need to implement very simple functions that will be later read from a cfg file. I went through the docs, but didn't find the way to read external classes and static…
Alex Poca
  • 2,406
  • 4
  • 25
  • 47
0
votes
0 answers

CS-Script is busy despite not running anything else?

I'm running Visual Studio and CSScript. My program is extremely simple. using System; namespace HelloWorld { class Hello { static void Main() { Console.WriteLine("Hello World!"); // Keep the console window open in debug…
jamesfdearborn
  • 769
  • 1
  • 10
  • 26
0
votes
1 answer

CSScript: Inject System.linq inside "CreateFunc"

This code: func = CSScript.CreateFunc(@"int f(int[] inputs) { return inputs.Max(); }"); int max = func(new int[]{ 235,123,675,111 }); is throwing: error CS1061: 'System.Array' does not contain a definition for 'Max' and no extension method…
sports
  • 7,851
  • 14
  • 72
  • 129
0
votes
1 answer

Change FilePath of CS-Script AsmHelper Object

I am using the AsmHelper class in the CS-Script library. I am wondering how to only use one AsmHelper object and just change the filepath using CSScript.LoadCode so I can load a new script after the previous script is done, but with only one…
Grant Meehan
  • 23
  • 2
  • 16
0
votes
1 answer

How can a CSharpScript process to capture the output generated by a vbscript or cs-script?

Is there a way for the hosting process to capture the output generated by a vbScript or cs-script when that script is run by CSharpScript(Rosslyn) ? I am running a Rosslyn script in C#. I would like to log the Console or Trace output generated by…
jlo-gmail
  • 4,453
  • 3
  • 37
  • 64
0
votes
1 answer

CS-Script for notepad++ prepare exe for distribution with icon

I'm a complete newbie at C# I'm using Notepad++ for coding with CS-Script plugin for notepad++. I've developed a little script in it. In such script I use a traybar icon that I made myself and I included a reference to it in the script with the…
willy wonka
  • 1,440
  • 1
  • 18
  • 31