Repository navigation
Description
What users see
Any existing TypeScript AppHost project whose aspire.config.json pins
Aspire.Hosting.JavaScript to 13.3.0 crashes the moment it runs against
a 13.4 CLI:
$ aspire add
...
RPC server exception:
System.TypeLoadException: Could not load type 'Aspire.TypeSystem.AtsJsonCodeWriter'
from assembly 'Aspire.TypeSystem, Version=42.42.42.42, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.
at Aspire.Hosting.CodeGeneration.TypeScript.AtsTypeScriptCodeGenerator.RenderTypeScriptExportedValue(...)
at Aspire.Hosting.CodeGeneration.TypeScript.AtsTypeScriptCodeGenerator.WriteTypeScriptExportedValueChildren(...)
...
at Aspire.Hosting.RemoteHost.CodeGeneration.CodeGenerationService.GenerateCode(String language, String assemblyName)
❌ An error occurred while adding the package: Could not load type 'Aspire.TypeSystem.AtsJsonCodeWriter' ...
The failure is in the codegen RPC server, so it's not specific to aspire add —
any operation that triggers TypeScript codegen on a 13.3.0-pinned project hits
the same crash (aspire restore, aspire run, etc.).
Who is affected
Every user who:
- Has a TypeScript AppHost project created against 13.3.0 GA, and
- Picks up any CLI built off
mainafter 2026-05-05 (when Make AtsJsonCodeWriter a shared internal helper #16677 merged).
That includes the entire 13.4 release once it ships.
Repro
Starting from any TypeScript AppHost project with this aspire.config.json:
{
"appHost": { "path": "apphost.ts", "language": "typescript/nodejs" },
"sdk": { "version": "13.3.0" },
"packages": { "Aspire.Hosting.JavaScript": "13.3.0" }
}Install any main-derived 13.4 CLI build and run aspire add (or aspire restore)
in the project.
Confirmed against origin/main @ 124cad0c58 with a locally-built 13.4.0-dev
CLI on a fresh 13.3.0-pinned TypeScript AppHost project.
Cause
#16677 ("Make AtsJsonCodeWriter shared internal helper", merged 892a87558c
on 2026-05-05) removed public class Aspire.TypeSystem.AtsJsonCodeWriter from
Aspire.TypeSystem.dll. The class is now internal in Aspire.Shared.Json,
source-linked per consumer.
The 13.3.0 GA Aspire.Hosting.CodeGeneration.TypeScript.dll was compiled
against the public form and carries a hard TypeRef to
[Aspire.TypeSystem v13.3.0.0] Aspire.TypeSystem.AtsJsonCodeWriter. The 13.4
Aspire.TypeSystem.dll no longer defines that type and there is no
[TypeForwardedTo] shim, so the runtime throws TypeLoadException as soon as
any codegen path touches it.
The 13.4 CLI does not detect or shield users from this — it restores the
13.3.0 codegen DLL the project pins, then loads it against its own bundled
13.4 Aspire.TypeSystem.dll.
Related
- Make AtsJsonCodeWriter a shared internal helper #16677 — the binary break
- [release/13.3] Make AtsJsonCodeWriter a shared internal helper #16752 — backport of Make AtsJsonCodeWriter a shared internal helper #16677 to
release/13.3(not yet shipped; if it ships
without a compat shim it will hitrelease/13.3users the same way)
Activity
sebastienros commentedon May 11, 2026
I am surprised this was not part of 13.3 build already
cc Eric Erhardt (@eerhardt)
sebastienros commentedon May 11, 2026
To me it looks like it was merged in 13.3, here is the tag's commits: https://github.com/microsoft/aspire/commits/v13.3.0
joperezr commentedon May 11, 2026
🤖 Aspire triage pass — 2026-05-11 23:00 UTC
Area:
area-cli,area-polyglotKind: regression
Repro: yes-minimal — pinned
aspire.config.jsonshown verbatim; reproduced againstorigin/main@124cad0c58with a locally-built13.4.0-devCLI on a fresh 13.3.0-pinned TypeScript AppHost projectAffected version(s): any
main-derived 13.4 CLI build (after #16677 merged on 2026-05-05) running against a TypeScript AppHost pinned toAspire.Hosting.JavaScript13.3.0Severity: S1 — fleet-wide outage scenario: every TypeScript AppHost pinned to 13.3.0 GA crashes the moment it picks up 13.4 (including the entire 13.4 release once it ships), no in-product workaround
Urgency: 🔴 servicing — recommend milestone 13.4 (ship-blocker for 13.4)
Reason: hard binary break introduced in main by #16677 (
Aspire.TypeSystem.AtsJsonCodeWriterremoved without[TypeForwardedTo]shim). 13.3.0 codegen DLLs carry a TypeRef to the removed type, throwTypeLoadExceptionon first codegen call. Also threatensrelease/13.3if backport #16752 ships without a compat shim — flag for servicing review too.Suggested owner(s): Sébastien Ros (@sebastienros) (already cc'd; owns
Aspire.Hosting.RemoteHost,/src/Aspire.Hosting/Ats, polyglot per CODEOWNERS), backup James Newton-King (@JamesNK)Evidence:
/src/Aspire.Hosting.RemoteHostand/src/Aspire.Hosting/Ats(the codegen surface in the stack trace)area-cli(43 merged PRs in last 90d) — backup if Sébastien Ros (@sebastienros) is unavailableConfidence: high
Needs human?: no — but please double-check the 13.4 vs 13.3-servicing call: the fix probably ships in 13.4 (add a
[TypeForwardedTo]shim or revert the public-API removal), and any release/13.3 servicing build picking up #16752 needs the same shimDry-run mode — no labels or milestone applied. Reply
/triage applyto promote, or edit and reapply.eerhardt commentedon May 12, 2026
I believe you have a corrupt nuget cache (since we had multilpe builds with
13.3.0).Try clearing your nuget cache and try again.
dotnet nuget locals all -cThe reason I think this is:
42.42.42.42is a locally built version or a PR built version.