ClearScript is now easier to use with LINQPad and .NET Fiddle.
Background
.NET playgrounds such as LINQPad and .NET Fiddle offer a great way to create small programs and explore the .NET platform.
In the past, ClearScript was difficult to use with these environments due to its reliance on native V8 assemblies and the Windows-only .NET Framework. Now that it supports newer .NET runtimes as well as several popular operating systems and machine architectures, ClearScript is much easier to incorporate into LINQPad and .NET Fiddle.
ClearScript 7.3 includes additional changes that make it almost as easy to use in these environments as a pure .NET library.
LINQPad
LINQPad is a powerful .NET playground for Windows. We’ve tested ClearScript 7.3 with LINQPad 7 (x86/x64 and arm64) and LINQPad 5 (x86/x64).
Use the LINQPad NuGet Manager to add the appropriate package to your query:
-
For LINQPad 7 (x86/x64) and LINQPad 5, use ClearScript Library for Windows (x86/x64) (Package ID: Microsoft.ClearScript).
-
For LINQPad 7 (arm64), use ClearScript Library for Windows (arm64) (Package ID: Microsoft.ClearScript.win-arm64).
Be sure to select Version 7.3.0 or later. As soon as LINQPad completes the package import procedure, ClearScript is ready to go:
.NET Fiddle
.NET Fiddle is a convenient online .NET playground that enables easy sharing of code snippets. ClearScript 7.3 works seamlessly with its .NET 6 compiler.
Here’s how to enable ClearScript in your fiddle:
-
Select “.NET 6” in the Compiler drop-down menu:
-
Add the NuGet package ClearScript Library for Linux (x64) (Package ID: Microsoft.ClearScript.linux-x64). Be sure to select Version 7.3.0 or later:
You are now ready to use ClearScript:
You can find this fiddle here. Click here to see the full set of ClearScript examples in action.
Good luck!