Jazor 0.3.4
See the version list below for details.
dotnet add package Jazor --version 0.3.4
NuGet\Install-Package Jazor -Version 0.3.4
<PackageReference Include="Jazor" Version="0.3.4" />
<PackageVersion Include="Jazor" Version="0.3.4" />
<PackageReference Include="Jazor" />
paket add Jazor --version 0.3.4
#r "nuget: Jazor, 0.3.4"
#:package Jazor@0.3.4
#addin nuget:?package=Jazor&version=0.3.4
#tool nuget:?package=Jazor&version=0.3.4
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.1.33" />
</ItemGroup>
Usage
Class libraries
Every project that declares [ECMAScriptModule] must reference Jazor:
<ItemGroup>
<PackageReference Include="Jazor" Version="0.1.33" />
</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.1.33" />
<PackageReference Include="ECMAScript.VueRoute" Version="0.1.33" />
<PackageReference Include="ECMAScript.Pinia" Version="0.1.33" />
<PackageReference Include="ECMAScript.Vuetify" Version="0.1.33" />
<PackageReference Include="ECMAScript.TDesign" Version="0.1.33" />
<PackageReference Include="ECMAScript.Style" Version="0.1.33" />
</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.1.33" />
</ItemGroup>
<PropertyGroup>
<JazorMode>debug</JazorMode>
<JazorDir>$(MSBuildProjectDirectory)\wwwroot\jazor\</JazorDir>
<JazorTool>Deno</JazorTool>
</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 only the production bundle and source map throughJazorTool;Denouses the bundled runtime, andNetpackuses the packaged NetPack lane.
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.1.33" />
<PackageReference Include="Jazor.Vue" Version="0.1.33" 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 only production bundle assets.JazorTooldefaults toDenoand is used only byrelease; bundle builds pass the intermediate manifest, artifact root, source root, and output root to the selectedDenoorNetpacklane.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- No dependencies.
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Jazor:
| Package | Downloads |
|---|---|
|
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.VueRoute
Vue Router 4 host bindings for ECMAScript runtime authoring. |
|
|
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.11.0 | 0 | 8/11/2026 |
| 0.10.0 | 0 | 8/11/2026 |
| 0.9.0 | 0 | 8/11/2026 |
| 0.8.3 | 28 | 8/11/2026 |
| 0.8.2 | 33 | 8/11/2026 |
| 0.7.0 | 48 | 8/10/2026 |
| 0.6.0 | 48 | 8/10/2026 |
| 0.5.0 | 48 | 8/9/2026 |
| 0.4.0 | 51 | 8/9/2026 |
| 0.3.4 | 53 | 8/9/2026 |
| 0.3.3 | 57 | 8/7/2026 |
| 0.3.2 | 48 | 8/6/2026 |
| 0.1.48 | 53 | 8/5/2026 |
| 0.1.47 | 54 | 8/5/2026 |
| 0.1.46 | 50 | 8/5/2026 |
| 0.1.45 | 61 | 8/5/2026 |
| 0.1.43 | 94 | 8/4/2026 |
| 0.1.42 | 100 | 8/4/2026 |
| 0.1.41 | 98 | 8/4/2026 |
| 0.1.40 | 105 | 8/3/2026 |