Jazor 0.9.0

dotnet add package Jazor --version 0.9.0
                    
NuGet\Install-Package Jazor -Version 0.9.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Jazor" Version="0.9.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jazor" Version="0.9.0" />
                    
Directory.Packages.props
<PackageReference Include="Jazor" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jazor --version 0.9.0
                    
#r "nuget: Jazor, 0.9.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Jazor@0.9.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jazor&version=0.9.0
                    
Install as a Cake Addin
#tool nuget:?package=Jazor&version=0.9.0
                    
Install as a Cake Tool

Jazor

定位:将受支持 C# 语义编译为确定性 ECMAScript 模块的核心 NuGet 包。

Jazor 包含核心 runtime contract、analyzer、source generator、Emit 工具、MSBuild 集成、ASP.NET Core 集成与基础 Vue 3 authoring 类型。Razor-to-Vue 是独立的 Jazor.Vue opt-in,不属于核心平台定义。

安装

<ItemGroup>
  <PackageReference Include="Jazor" Version="0.9.0" />
</ItemGroup>

所有声明 [ECMAScriptModule] 的类库和最终宿主都应引用 Jazor。类库保留默认 JazorMode=none;最终可执行或 Web 宿主负责收集引用程序集的 catalog 并输出产物。

宿主输出

<PropertyGroup>
  <JazorMode>debug</JazorMode>
  <JazorDir>$(MSBuildProjectDirectory)\wwwroot\jazor\</JazorDir>
</PropertyGroup>
JazorMode 行为
none 默认值,不写入产物
debug 输出模块、source map 与 jazor-manifest.json
release 经内置 Netpack 路径输出生产浏览器 bundle

JazorSSR=true 会在 release 输出中额外保留服务器渲染所需的原始模块图;它与浏览器 bundle 分开维护。

可选生态包

Vue Router、Pinia、UI 组件库与 CSS-in-JS 均需按使用场景显式引用对应 ECMAScript.* 包:

<ItemGroup>
  <PackageReference Include="ECMAScript.VueRoute" Version="0.9.0" />
  <PackageReference Include="ECMAScript.Pinia" Version="0.9.0" />
  <PackageReference Include="ECMAScript.Vuetify" Version="0.9.0" />
  <PackageReference Include="ECMAScript.TDesign" Version="0.9.0" />
  <PackageReference Include="ECMAScript.Style" Version="0.9.0" />
</ItemGroup>

ECMAScript.VueJazor 提供;ECMAScript.Pinia.Testing 是叠加在 ECMAScript.Pinia 之上的测试期 opt-in 包。所有 Jazor 与 ECMAScript.* 包应保持相同版本。

SSR

在 ASP.NET Core Web 项目中配置 release 与 SSR:

<PropertyGroup>
  <JazorMode>release</JazorMode>
  <JazorSSR>true</JazorSSR>
</PropertyGroup>
builder.Services.AddJazorSSR();

var app = builder.Build();
app.UseStaticFiles();
app.UseJazorSSR("components/app.mjs", new { Title = "Jazor" });

ASP.NET Core 持有请求管线、静态资源与响应文档,DenoHost 执行本地 Vue 服务器模块,Netpack 只负责浏览器构建。应用不需要全局 Deno、node_modules、CDN 或远程 import。

Razor-to-Vue

Razor SDK 项目需要额外引用 Jazor.Vue

<ItemGroup>
  <PackageReference Include="Jazor.Vue" Version="0.9.0" PrivateAssets="all" />
</ItemGroup>

该集成直接消费官方 Razor Source Generator 完成后的最终 Compilation,不需要 EnableRazorHostOutputs、Razor IR、RazorCodeDocument 或二次解析生成 C#。

相关文档

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on Jazor:

Package Downloads
ECMAScript.TDesign

TDesign Vue Next bindings and RazorVue authoring component stubs for ECMAScript.

ECMAScript.Pinia

Pinia host bindings for ECMAScript runtime authoring.

ECMAScript.VueRoute

Vue Router 4 host bindings for ECMAScript runtime authoring.

ECMAScript.Vuetify

Vuetify bindings and RazorVue authoring component stubs for ECMAScript.

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.9.0 0 8/11/2026
0.8.3 0 8/11/2026
0.8.2 0 8/11/2026
0.7.0 38 8/10/2026
0.6.0 39 8/10/2026
0.5.0 38 8/9/2026
0.4.0 43 8/9/2026
0.3.4 44 8/9/2026
0.3.3 48 8/7/2026
0.3.2 40 8/6/2026
0.1.48 45 8/5/2026
0.1.47 46 8/5/2026
0.1.46 42 8/5/2026
0.1.45 53 8/5/2026
0.1.43 86 8/4/2026
0.1.42 92 8/4/2026
0.1.41 90 8/4/2026
0.1.40 103 8/3/2026
0.1.39 98 8/3/2026
0.1.38 101 8/2/2026
Loading failed