Jazor 0.8.3
See the version list below for details.
dotnet add package Jazor --version 0.8.3
NuGet\Install-Package Jazor -Version 0.8.3
<PackageReference Include="Jazor" Version="0.8.3" />
<PackageVersion Include="Jazor" Version="0.8.3" />
<PackageReference Include="Jazor" />
paket add Jazor --version 0.8.3
#r "nuget: Jazor, 0.8.3"
#:package Jazor@0.8.3
#addin nuget:?package=Jazor&version=0.8.3
#tool nuget:?package=Jazor&version=0.8.3
Jazor
Write JavaScript in C#.
Jazor is a C#-to-JavaScript compiler that translates Roslyn IOperation semantics into standard ECMAScript AST. The Jazor package carries the core runtime, analyzer, source generator, emit tool, MSBuild integration, and the baseline Vue 3 authoring surface. Razor-to-Vue integration is provided separately by Jazor.Vue.
Features
- C# → JS compilation — lowers Roslyn semantic model (
IOperation) to ESTree-compliant JavaScript via Acornima, preserving evaluation order and side-effect semantics. - Whitelist-gated runtime surface — only explicitly mapped CLR APIs are emitted as JavaScript. The bundled analyzer enforces these boundaries at compile time.
- Vue 3 authoring surface — write
defineComponent(),h(), typed props/slots, and reactive setups in C#; emitted JS is standard Vue 3 component shapes with no private runtime wrapper. - Record structural lowering — C# records lower to plain JS objects with
[Spread]flattening and staticnullomission, no runtime overhead. - Source Generator + MSBuild — whitelist generation, emit, and optional bundling run automatically during build. No extra toolchain required.
- Source Maps — every emitted
.mjsships with an accompanying.mjs.map.
Install
<ItemGroup>
<PackageReference Include="Jazor" Version="0.8.3" />
</ItemGroup>
Usage
Class libraries
Every project that declares [ECMAScriptModule] must reference Jazor:
<ItemGroup>
<PackageReference Include="Jazor" Version="0.8.3" />
</ItemGroup>
Library projects keep the default JazorMode=none.
Optional frontend ecosystem packages
Jazor no longer bundles higher-level Vue ecosystem libraries by default. Add them explicitly when your authoring surface needs them:
<ItemGroup>
<PackageReference Include="Jazor" Version="0.8.3" />
<PackageReference Include="ECMAScript.VueRoute" Version="0.8.3" />
<PackageReference Include="ECMAScript.Pinia" Version="0.8.3" />
<PackageReference Include="ECMAScript.Vuetify" Version="0.8.3" />
<PackageReference Include="ECMAScript.TDesign" Version="0.8.3" />
<PackageReference Include="ECMAScript.Style" Version="0.8.3" />
</ItemGroup>
ECMAScript.Vue3remains part of the defaultJazorpackage.ECMAScript.Pinia.Testingis a separate opt-in testing package layered on top ofECMAScript.Pinia.ECMAScript.Styleis a framework-neutral module in the ECMAScript ecosystem. It depends on the exact sameJazorversion and reuses this package's compiler and MSBuild integration.
Host / executable projects
The final executable or web host project selects one output mode:
<ItemGroup>
<PackageReference Include="Jazor" Version="0.8.3" />
</ItemGroup>
<PropertyGroup>
<JazorMode>debug</JazorMode>
<JazorDir>$(MSBuildProjectDirectory)\wwwroot\jazor\</JazorDir>
</PropertyGroup>
JazorMode=noneis the default and writes no artifacts.JazorMode=debugscans the host output and referenced assemblies, then writes debug modules andjazor-manifest.json.JazorMode=releaseperforms its internal materialization in an intermediate directory, then writes the production browser bundle and source map through the packaged Netpack lane.JazorSsrEnabled=trueadditionally preserves a materialized raw module graph atwwwroot/jazor/ssr/for server rendering. This graph is separate from the optimized browser bundle.
SSR
ASP.NET Core owns the SSR request pipeline, routing, response document, and static assets. DenoHost executes the generated Vue module through its packaged local runtime, so the application does not need a globally installed Deno executable.
<PropertyGroup>
<JazorMode>release</JazorMode>
<JazorSsrEnabled>true</JazorSsrEnabled>
</PropertyGroup>
builder.Services.AddJazorSsr();
var app = builder.Build();
app.UseStaticFiles();
app.UseJazorSsr("components/app.mjs", new { Title = "Jazor" });
UseJazorSsr uses the existing SPA fallback rules, so static files and mapped endpoints continue to win. It renders with @vue/server-renderer, emits the same JSON props for client hydration, and retains the browser import map and styles in the response.
IJazorSsrRenderer is the stable SSR boundary. DenoHost is the runtime executor, while Netpack remains the browser build-time bundler. Neither role requires application node_modules, a CDN, or remote imports. Vue server-prefetch state is not automatically transferred to the browser; applications must explicitly include any shared state in their props or another application-owned payload.
Razor-to-Vue integration
Add Jazor.Vue to a Razor SDK project to opt into the official Razor Source Generator final-compilation boundary:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net11.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Jazor" Version="0.8.3" />
<PackageReference Include="Jazor.Vue" Version="0.8.3" PrivateAssets="all" />
</ItemGroup>
</Project>
Jazor.Vue hooks the completed Roslyn generator-driver result, then binds final generated C# and BuildRenderTree against that final compilation. Razor component modules lower to Vue render-function .mjs artifacts through the shared compiler/render-context path. Jazor alone neither installs the hook nor scans Razor components.
The integration directly consumes the final Compilation; it does not require EnableRazorHostOutputs, RazorCodeDocument, RazorCSharpDocument, or reparsing generated C#.
Current MSBuild emit behavior
The existing emit targets continue to handle declared ECMAScript modules independently of the future Razor component lowering:
JazorModedefaults tonone;debugandreleaseare mutually exclusive build outputs.JazorDirdefaults to$(MSBuildProjectDirectory)\wwwroot\jazor\.debugwrites modules plusjazor-manifest.json;releaseclearsJazorDir, materializes internally, and writes browser bundle assets. WithJazorSsrEnabled=true, it also writes the raw SSR graph underJazorDir\ssr\.releasepasses the intermediate manifest, artifact root, source root, and output root to the fixed Netpack bundle lane.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- DenoHost.Core (>= 2.9.5)
- DenoHost.Runtime.win-x64 (>= 2.9.5)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Jazor:
| Package | Downloads |
|---|---|
|
ECMAScript.VueRoute
Vue Router 4 host bindings for ECMAScript runtime authoring. |
|
|
ECMAScript.Vuetify
Vuetify bindings and RazorVue authoring component stubs for ECMAScript. |
|
|
ECMAScript.TDesign
TDesign Vue Next bindings and RazorVue authoring component stubs for ECMAScript. |
|
|
ECMAScript.Pinia
Pinia host bindings for ECMAScript runtime authoring. |
|
|
Jazor.Admin
Jazor admin-shell contracts and native RazorVue components. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.13.0 | 33 | 8/12/2026 |
| 0.12.0 | 36 | 8/12/2026 |
| 0.11.0 | 62 | 8/11/2026 |
| 0.10.0 | 61 | 8/11/2026 |
| 0.9.0 | 66 | 8/11/2026 |
| 0.8.3 | 67 | 8/11/2026 |
| 0.8.2 | 70 | 8/11/2026 |
| 0.7.0 | 78 | 8/10/2026 |
| 0.6.0 | 79 | 8/10/2026 |
| 0.5.0 | 78 | 8/9/2026 |
| 0.4.0 | 81 | 8/9/2026 |
| 0.3.4 | 83 | 8/9/2026 |
| 0.3.3 | 86 | 8/7/2026 |
| 0.3.2 | 77 | 8/6/2026 |
| 0.1.48 | 85 | 8/5/2026 |
| 0.1.47 | 85 | 8/5/2026 |
| 0.1.46 | 81 | 8/5/2026 |
| 0.1.45 | 83 | 8/5/2026 |
| 0.1.43 | 94 | 8/4/2026 |
| 0.1.42 | 100 | 8/4/2026 |