Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
6 changes: 3 additions & 3 deletions dotnet/CodeExec/CodeExec.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-->
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net8.0</TargetFrameworks>
<!-- Hosts may vendor Core as source (Unity-MCP: C# 9), so both targets compile as C# 9. -->
<TargetFrameworks>netstandard2.0;net8.0;net10.0</TargetFrameworks>
<!-- Hosts may vendor Core as source (Unity-MCP: C# 9), so every target compiles as C# 9. -->
<LangVersion>9.0</LangVersion>
<AssemblyName>com.IvanMurzak.CodeExec</AssemblyName>
<RootNamespace>com.IvanMurzak.CodeExec</RootNamespace>
Expand Down
2 changes: 1 addition & 1 deletion dotnet/PACKAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion dotnet/samples/PackageConsumer/PackageConsumer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
-->
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<Nullable>disable</Nullable>
<LangVersion>9.0</LangVersion>
<ImplicitUsings>disable</ImplicitUsings>
Expand Down
6 changes: 4 additions & 2 deletions scripts/consume.sh
Original file line number Diff line number Diff line change
@@ -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/<tfm>). 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
Loading