Questions tagged [clearscript]

ClearScript is a library that makes it easy to add scripting to your .NET applications. It currently supports JavaScript (via V8 and JScript) and VBScript.

72 questions
2
votes
1 answer

How can I improve React.Net / SuperchargedReact server-side rendering performance for concurrent requests?

I am experimenting with server-side rendering of React components from within a ASP.NET website using both React.Net and SuperchargedReact implementations. My initial load test results show that a single request can be handled reasonably quickly…
jdmcay
  • 21
  • 2
2
votes
1 answer

ClearScript: How to output an object?

Here is the C# code: string jsScript = "var x = {A: 10, B: 100}"; scriptEngine.Evaluate(jsScript); var result = scriptEngine.Evaluate("x"); The result is an instance of WindowsScriptItem object, how can I get the values 10 and 100?
Zach
  • 5,715
  • 12
  • 47
  • 62
1
vote
2 answers

Could not load file or assembly 'ClearScriptV8.win-x64.dll' or one of its dependencies. The module was expected to contain an assembly manifest

I have .NET MVC app (.NET Framework 4.6.1) and I want to add ClearScript to my app. I've added package Microsoft.ClearScript via NuGet and after launch app I have error: Could not load file or assembly…
A. Gladkiy
  • 3,134
  • 5
  • 38
  • 82
1
vote
1 answer

Is it possible to use ClearScript on Mac M1?

OS: Mac M1 Framework: .Net 6.0 IDE: Rider NuGet packages: Microsoft.ClearScript (v7.2.1) Microsoft.ClearScript.V8 (v7.2.1) My simple JavaScript REPL: using Microsoft.ClearScript.V8; using myConsole = System.Console; var v8 = new…
Andrey Bushman
  • 11,712
  • 17
  • 87
  • 182
1
vote
1 answer

Does Microsoft's ClearScript has any editor?

Does Microsoft's ClearScript has any editor to create VbScripts or JScripts?
Sam
  • 11
  • 1
1
vote
1 answer

Attempting to create V8ScriptEngine instance fails with IExpando error

I am trying to create an instance of V8ScriptEngine but am getting an exception as below: using Microsoft.ClearScript.V8; V8ScriptEngine engine = new V8ScriptEngine(); Exception: "Could not load type…
pnizzle
  • 6,243
  • 4
  • 52
  • 81
1
vote
1 answer

How can I run untrusted javascript in clearscript?

I'm looking at Clearscript for running my javascript code in my c# program. I intend to use its V8 implementation, as implementing my own build of V8 is not possible right now (MSVC build is broken, hope they'll fix it soon). The question is: can I…
1
vote
0 answers

C# MS ClearScript Add dynamic host objects

I have a collection which I am exposing to a clearscript engine, at the moment I have to specify that the Value property is a static type int so that scripting basic arithmetic as plus or minus will work: Here's my collection and the class it makes…
PigSpider
  • 881
  • 9
  • 18
1
vote
0 answers

Having exposed System.Data.DataTable into JS via ClearScript how do I express its objects for TypeScript?

So I have an amped up JavaScript scripting environment in my application provided by ClearScript. It dawned on me that I could use TypeScript to write hopefully better code and for the most part that's working out. At the top of each script I have…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
1
vote
1 answer

C# MS ClearView access a property directly by another property's value

I am making a scripting program using MS ClearScript. I would like to be able to reference to a property indirectly without having to type out the value member of my class. Here is my class: namespace WpfApp1 { public class TagIO { …
PigSpider
  • 881
  • 9
  • 18
1
vote
0 answers

Use TypeScript to develop 3rd party JS scripts

We use ClearScript to extend our apps, exporting C# objects into the JavaScript environment. We'd like to use TypeScript to help develop these extending modules. These modules end in .RR for the main script and .RI for included library scripts. How…
bugmagnet
  • 7,631
  • 8
  • 69
  • 131
1
vote
1 answer

How to extend C# types with MS ClearScript?

I have a few classes (to be precise, there are about 70-100 classes in my project) written in C#. Those classes are converted to Javascript (I have added V8 Javacript MS ClearScript Engine to my project) and integrated in my application. I want to…
slavayancheg
  • 59
  • 2
  • 12
1
vote
1 answer

How to load jquery file in c# code using V8ScriptEngine (Clearscript)?

I am trying to execute javascript function from c# code using ClearScript(V8ScriptEngine). Here Script_Text is javascript code. I want to call api from jquery and load Execute function in C#.I got exception like $ is not defined.How can i load…
1
vote
1 answer

Process Debug Manager (PDM) security issues

I have an issue with all computers in AD: I'm getting this error after creating VBScriptEngine with debugging flag: either a required impersonation level was not provided, or the provided impersonation level is invalid. (Exception from HRESULT:…
Andrey
  • 81
  • 1
  • 4
1
vote
1 answer

Using ClearScript inside Threads

I have a C# application where I spawn multiple threads. I'm on .NET framework 4.7.1. Inside these threads, work is performed and this work may execute user-defined scripted functions. I am using ClearScript as the scripting engine and for purposes…
nullvalue
  • 31
  • 3