Pocok.Scripting.CSharp
0.2.0-alpha.7
Prefix Reserved
dotnet add package Pocok.Scripting.CSharp --version 0.2.0-alpha.7
NuGet\Install-Package Pocok.Scripting.CSharp -Version 0.2.0-alpha.7
<PackageReference Include="Pocok.Scripting.CSharp" Version="0.2.0-alpha.7" />
<PackageVersion Include="Pocok.Scripting.CSharp" Version="0.2.0-alpha.7" />
<PackageReference Include="Pocok.Scripting.CSharp" />
paket add Pocok.Scripting.CSharp --version 0.2.0-alpha.7
#r "nuget: Pocok.Scripting.CSharp, 0.2.0-alpha.7"
#:package Pocok.Scripting.CSharp@0.2.0-alpha.7
#addin nuget:?package=Pocok.Scripting.CSharp&version=0.2.0-alpha.7&prerelease
#tool nuget:?package=Pocok.Scripting.CSharp&version=0.2.0-alpha.7&prerelease
Pocok.Scripting.CSharp
Trusted-local C# adapter for the engine-neutral Pocok.Scripting runner. Validation and compilation occur in a fresh killable framework-dependent child process. Roslyn remains inside private worker assets and is not exposed as a transitive compile dependency.
var adapter = new CSharpScriptEngineAdapter(new CSharpScriptEngineOptions
{
DotNetHostPath = dotnetPath,
AllowedImports = ["MyApplication.Scripting"],
AllowedReferencePaths = [trustedContractsAssembly]
});
var runner = new ScriptRunner(new ScriptEngineRegistry([adapter]));
The .NET host is resolved only from CSharpScriptEngineOptions.DotNetHostPath, then DOTNET_HOST_PATH. Packaged consumers receive integrity-checked worker assets through buildTransitive. Repository-source and other explicitly managed deployments may point POCOK_CSHARP_WORKER_DIRECTORY at a built worker directory containing worker.sha256.
Default imports are limited to System, System.Collections.Generic, System.Linq, System.Threading, and System.Threading.Tasks. Request text cannot add references. #r, #load, unsafe/native code, reflection, dynamic loading, process, registry, filesystem, network, environment, and arbitrary host-object access are denied by default. Host-configured additions are intersected with explicit import/reference allowlists.
Validation, process separation, bounded streams, timeout, and kill-tree cancellation are guardrails, not an operating-system sandbox. Do not enable this adapter for anonymous hostile workloads.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Pocok.Scripting (>= 0.2.0-alpha.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0-alpha.7 | 58 | 7/20/2026 |