Skip to main content
Filter by
Sorted by
Tagged with
1 vote
2 answers
426 views

Last 10 entries (specifically all those in last 4 days) show as failed in Run History and have this message in the "Execute CSharp Script Code" action InvokeFunctionFailed The function '...
Chris Harrington's user avatar
1 vote
0 answers
191 views

Using CSharpScript, is there a way I can pass a variable a value or object instance before the script is run? it seems like using StateScript will allow me to set a script variable using the following....
BiddahProphet's user avatar
0 votes
1 answer
185 views

I try to run method by CSharpScript. Method: public class TaskSolution { public int[] Calculate(int[] inputValue) { return inputValue; } } I tried this solution: var script = ...
Sterlukin's user avatar
0 votes
3 answers
2k views

I am just learning how to use Roslyn and I have a script like this: var id = Guid.NewGuid(); string condition = $@"new List<Guid> {{ new Guid(""{Guid.NewGuid()}""), new ...
ScubaSteve's user avatar
  • 8,380
0 votes
1 answer
388 views

I have to give my clients the ability to edit scripts with VS Code. The problem.. when my software call: CSharpScript.EvaluateAsync<int>(code, opt, host); host object, should be passed to the ...
andreat's user avatar
  • 347
2 votes
1 answer
957 views

I wrote the following C# script (HelloWorld.csx file): #! "netcoreapp3.1" #r "nuget: System.Text.Encoding.CodePages, 5.0.0" public class Script { public static void Run() {...
Francois C's user avatar
  • 1,374
1 vote
1 answer
3k views

I have a requirement of executing a C# class in the string format and populate an object with the properties of that class. To achieve the requirement I was doing a POC and that's failed. Following ...
sambeet das's user avatar
2 votes
1 answer
518 views

error CS0246: The type or namespace name 'DateTime' could not be found (are you missing a using directive or an assembly reference?) When running the following code: public string ...
JasonDWilson's user avatar
0 votes
1 answer
854 views

I am trying to execute some arbitrary c sharp script in a c# .net application, but I have tried numerous ways to add an external file reference of an assembly and it never seems to work complaining I ...
Stevie187's user avatar
4 votes
1 answer
2k views

I'm trying to use CSharpScript in a Blazor wasm application, testing with a simple EvaluateAsync: var result = await CSharpScript.EvaluateAsync<int>("1 + 1"); Throws: System.IO....
Sarmad Georgie's user avatar
1 vote
1 answer
82 views

I have a SharpScript .ss script file with some small code that polls a database and formats things to display. The output is getting too unruly for command line output so I wanted to generate html and ...
gakera's user avatar
  • 3,687
1 vote
1 answer
3k views

I'm trying to use Roslyn to execute C# code that is defined by the user at runtime, similar to this example: public class Globals { public int X; public int Y; } var globals = new Globals { X ...
Krid's user avatar
  • 95
0 votes
1 answer
868 views

Use of DateTime within the roslyn CSharpScript evaluator returns error code 'Expected ;' while strings work fine. Using Visual Studio 2019 with Microsoft.CodeAnalysis.Common and Microsoft....
Badchenn's user avatar
4 votes
0 answers
879 views

I am trying to create an azure function program with a service bus queue trigger template using a csx file. But I am having issues resolving dependencies. To be honest, i am very confused about the ...
hfires's user avatar
  • 123
1 vote
0 answers
300 views

Trying to run script (using Roslyn Scripting API): var source = "while(true) { }"; return CSharpScript.EvaluateAsync(source).Result; It will run forever. How to interrupt it? I don't mind using ...
Sinatr's user avatar
  • 22.3k
4 votes
0 answers
551 views

My client wants to add the ability for users to define small scripts that can be used to run various calculations in a pre-existing web application. Currently, we're exploring using CSharpScripts in ...
matt.rothmeyer's user avatar
4 votes
1 answer
1k views

How can I stop RunAsync? CancellatioTokenSource cts = new CancellationTokenSource(); //I thought that it's must work, but it don't var script = CSharpScript.Create(code: someCode); await script....
itihonov's user avatar