diff --git a/AGENTS.md b/AGENTS.md index 0f89714..159f07f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ Unity, Godot, Unreal, MCP, ReflectorNet or any hosted service — hosts plug in ## Layout - `spec/contract.md` — normative request/response and snippet semantics. **The contract wins over any runtime.** - `fixtures/golden/` — shared cases (`csharp.json`, `python.json`); `fixtures/include/` — include trees they use. -- `dotnet/CodeExec/` — Core (`netstandard2.0` + `net8.0`), **no package dependencies**. +- `dotnet/CodeExec/` — Core (`netstandard2.0` + `net8.0` + `net10.0`), **no package dependencies**. - `dotnet/CodeExec.Roslyn/src/` — the Roslyn adapter, shipped as **source** (package `com.IvanMurzak.CodeExec.Roslyn`). - `dotnet/CodeExec.Tests/` — xUnit; compiles the adapter source like a consumer, against `-p:RoslynVersion=…`. - `dotnet/samples/PackageConsumer/` — consumes the packed packages with strict settings (nullable off, C# 9). diff --git a/README.md b/README.md index f4280b3..6b36b51 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ var runner = new CodeRunner(new RoslynCSharpCompiler(), new CodeRunnerOptions ExecuteResult result = await runner.ExecuteAsync(new ExecuteRequest { Code = "Application.unityVersion" }); ``` -`com.IvanMurzak.CodeExec` targets `netstandard2.0` (Unity / Mono, .NET Framework) and `net8.0`. +`com.IvanMurzak.CodeExec` targets `netstandard2.0` (Unity / Mono, .NET Framework), `net8.0` and `net10.0`. `com.IvanMurzak.CodeExec.Roslyn` is source-only: it compiles inside your project against **your** `Microsoft.CodeAnalysis.CSharp`. diff --git a/dotnet/CodeExec/CodeExec.csproj b/dotnet/CodeExec/CodeExec.csproj index cfb8059..bc2e62d 100644 --- a/dotnet/CodeExec/CodeExec.csproj +++ b/dotnet/CodeExec/CodeExec.csproj @@ -3,11 +3,11 @@ Core of Code-Exec. Deliberately has NO package dependencies — Roslyn included. The compiler is plugged in through ICSharpCompiler, implemented by the source-only package com.IvanMurzak.CodeExec.Roslyn, which compiles inside the consumer against the consumer's own Microsoft.CodeAnalysis.CSharp. - netstandard2.0 serves Unity (Mono) and .NET Framework; net8.0 adds the collectible AssemblyLoadContext host. + netstandard2.0 serves Unity (Mono) and .NET Framework; net8.0+ adds the collectible AssemblyLoadContext host. --> - netstandard2.0;net8.0 - + netstandard2.0;net8.0;net10.0 + 9.0 com.IvanMurzak.CodeExec com.IvanMurzak.CodeExec diff --git a/dotnet/PACKAGE.md b/dotnet/PACKAGE.md index 58f18e3..da574d2 100644 --- a/dotnet/PACKAGE.md +++ b/dotnet/PACKAGE.md @@ -7,7 +7,7 @@ the snippet's own lines. Two packages: - **`com.IvanMurzak.CodeExec`** — the runtime. No dependencies. `netstandard2.0` (Unity / Mono, .NET Framework) and - `net8.0` (each run in its own collectible `AssemblyLoadContext`, unloaded afterwards). + `net8.0` / `net10.0` (each run in its own collectible `AssemblyLoadContext`, unloaded afterwards). - **`com.IvanMurzak.CodeExec.Roslyn`** — source-only: the compiler adapter compiles inside your project against **your** `Microsoft.CodeAnalysis.CSharp` (3.8 or newer). Add that package yourself. diff --git a/dotnet/samples/PackageConsumer/PackageConsumer.csproj b/dotnet/samples/PackageConsumer/PackageConsumer.csproj index 750ce8f..4412ffb 100644 --- a/dotnet/samples/PackageConsumer/PackageConsumer.csproj +++ b/dotnet/samples/PackageConsumer/PackageConsumer.csproj @@ -6,7 +6,7 @@ --> Exe - net8.0 + net8.0;net10.0 disable 9.0 disable diff --git a/scripts/consume.sh b/scripts/consume.sh index 7759c5b..007c1c8 100755 --- a/scripts/consume.sh +++ b/scripts/consume.sh @@ -1,10 +1,12 @@ #!/usr/bin/env bash # Builds and runs dotnet/samples/PackageConsumer against the packed packages in ./packages, once per Roslyn version -# given (default 4.8.0). Run scripts/pack.sh first. +# given (default 4.8.0) and per target framework (net8.0, net10.0: each consumes its own lib/). Run scripts/pack.sh first. set -euo pipefail root="$(cd "$(dirname "$0")/.." && pwd)" sample="$root/dotnet/samples/PackageConsumer" for v in "${@:-4.8.0}"; do rm -rf "$sample/obj" "$sample/bin" - dotnet run --project "$sample/PackageConsumer.csproj" -p:RoslynVersion="$v" + for tfm in net8.0 net10.0; do + dotnet run --project "$sample/PackageConsumer.csproj" -f "$tfm" -p:RoslynVersion="$v" + done done