Jazor.Vue 1.1.0

dotnet add package Jazor.Vue --version 1.1.0
                    
NuGet\Install-Package Jazor.Vue -Version 1.1.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.Vue" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jazor.Vue" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Jazor.Vue" />
                    
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.Vue --version 1.1.0
                    
#r "nuget: Jazor.Vue, 1.1.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.Vue@1.1.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.Vue&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Jazor.Vue&version=1.1.0
                    
Install as a Cake Tool

Jazor.Vue

定位:Razor SDK 项目显式启用 Razor-to-Vue 的 NuGet 包。

资源契约:RazorVue 生成的组件模块进入程序集内的 Jazor.Generated.ModuleCatalog;Vue runtime bridge 由本包 manifest 声明的 embedded carrier 提供,外部 binding runtime 由 npm/JSR package metadata 提供。

Jazor.Vue 安装消费官方 Razor Source Generator 最终 Roslyn Compilation 的 generator-driver hook。Razor 组件的 BuildRenderTree 操作会降低为 Vue render-function 模块,并生成供 Jazor.Emit 读取的 Jazor.Generated.ModuleCatalog;本包唯一的 buildTransitive/Jazor.Vue.targets 始终传递资源 manifest locator,并仅在当前项目直接声明 Jazor.Vue 时注册 RazorVue analyzer。

安装

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

该包是 opt-in,必须与 Jazor 一起引用。只引用 Jazor 不会安装 Razor hook、扫描 Razor 组件或生成 Vue 模块。Jazor.Vue 只携带合并后的 Jazor.RazorVue analyzer,避免重复装载共享 generator。

编写 RazorVue 组件的类库或应用必须在当前项目直接声明 Jazor 和 Jazor.Vue;组件模块属于 纯 Jazor carrier,生成后进入程序集内的 Jazor.Generated.ModuleCatalog。如果项目发布可复用 类库,工具引用通常使用 PrivateAssets="all";只消费该类库的下游项目不会因传递引用获得 RazorVue analyzer、generator 或 Emit 资格。

Jazor/Jazor.Vue 的 analyzer、generator、build target 和 Emit 资格遵循“谁使用,谁直接引用”;它们不应因为中间类库引用而成为下游的隐式工具依赖。组件库的 ESM/CSS 等运行时资源通过 manifest 的显式依赖传播。跨项目的完整规则见类库产物与引用契约。

RazorVue analyzer 与 AngleSharp 位于 tools/net11.0/analyzers/,由当前项目直接声明 Jazor.Vue 时通过该包的 buildTransitive/Jazor.Vue.targets 条件注册;它们不放入 NuGet 自动导入的 analyzers/dotnet/cs,也不随组件库引用激活。

Blazor framework CLR mapping 由 Jazor.CLR.Generator 从真实 ASP.NET Core reference symbol 生成,再由 Jazor.CLR 唯一持有 module、mapping、helper;生成的 runtime JavaScript 进入 ECMAScript 的 manifest 与 src/ECMAScript/clr/** carrier,用户不需要复制映射源码或手工注册资源。当前 browser-interactive Support 覆盖 Mouse/Keyboard/Focus/Change,以及 Pointer/Wheel/Drag/Clipboard/Touch/Error/Progress 的 getter-only 原生事件投影;TouchList 在 CLR 属性访问时惰性转换为数组 carrier。七组扩展事件已由 Blazor EventHandlers reference metadata、official Razor SG/NodeApi、真实 BrowserSmoke 与 isolated Release package consumer 共同验证。统一 Release 包边界和基本 Razor/Vue 消费路径已由 SdkIntegrationTests.Build_LocalReleasePackage_CoreConsumer_ExcludesBlazorAndVuePackages 与 SdkIntegrationTests.Build_LocalReleasePackage_VueConsumer_IncludesRazorVueWithoutBlazorAssembly 分别验证;合成 EventArgs payload、CLR DataTransfer DTO 的 Files/Items 属性和完整 SSR/prerender identity 仍不支持/不声明。preview.8 的原生集合入口见下述 extension。

preview.8 增加原生 file/drop 切片:InputFileChangeEventArgs 的 CLR alias 保留 browser Event carrier,FileCount 投影原生 list length;本包的 ECMAScript.NativeFileEventExtensions 为现有 InputFileChangeEventArgs/DragEventArgs 增加 Files 属性,直接访问 FileList/FileRef 和 FormData。该 extension 位于 opt-in Vue 作者程序集,核心 ECMAScript/Jazor.CLR 不引入 ASP.NET Core 引用。官方 Razor SG、compiler 和 NodeApi 回归覆盖原生文件载荷、清空、多文件、multipart 和 Object URL 回收;IBrowserFile/CLR Stream 未进入此切片。写法见 Browser Interop。

preview.8 同时为 12 种 DOM 事件增加 NativeEvent 和缺失的原生属性,剪贴板可直接使用 ClipboardData,焦点/鼠标可使用 RelatedTarget。NativeBrowserPayloadExtensions 补齐 DataTransfer、DataTransferItem、TouchPoint、ElementReference 的强类型原生投影;DataTransferItem.Kind/Type 也已映射。原生 NativeFiles/NativeItems/NativeTouches 保留 browser collection,完整方法继续来自 WebIDL;既有 CLR 数组属性的边界保持。详细列表见原生事件扩展。

产物输出

JazorMode 结果
none 默认值,不输出产物
debug 标准 JS 项目中的模块与 source map;Emit 增量状态写入 obj
release 生产浏览器 bundle、可选 SSR bundle 与所需资源

JazorDir 默认是 $(MSBuildProjectDirectory)\jazor\ 的最终输出目录。MSBuild 只在最终 Exe/WinExe 构建后调用 Emit;它读取程序集 ModuleCatalog 与资源 manifest,完成校验后直接 物化到该目录,发布时由 SDK 将 dist/** 和可选 ssr/** 复制到 <publish>\jazor\;source map 默认不发布,需要时设置 JazorPublishSourceMaps=true。该集成不需要 EnableRazorHostOutputs、RazorCodeDocument、RazorCSharpDocument 或二次解析生成 C#; release 执行标准项目 package.json 中的构建脚本;默认脚本使用 Vite,也可以由应用替换。

相关文档

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.
  • net11.0

NuGet packages (20)

Showing the top 5 NuGet packages that depend on Jazor.Vue:

Package Downloads
ECMAScript.VueRoute

Vue Router 5 C# bindings and RazorVue contracts backed by package metadata and the restored npm package.

ECMAScript.Vuetify

Vuetify C# bindings and RazorVue component contracts backed by package metadata and the restored npm package.

ECMAScript.TDesign

TDesign Vue Next C# bindings and RazorVue contracts backed by package metadata and the restored npm package.

ECMAScript.Pinia

Pinia 4 C# host bindings backed by package metadata and the restored npm package for Jazor applications.

ECMAScript.Pinia.Testing

@pinia/testing C# host bindings backed by package metadata and the restored npm package for Jazor tests.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 0 11/11/2026
1.0.0 59 11/11/2026
1.0.0-preview.9 149 10/10/2026
1.0.0-preview.8 150 10/9/2026
1.0.0-preview.7 153 9/29/2026
1.0.0-preview.6 151 9/28/2026
1.0.0-preview.5 161 9/28/2026
1.0.0-preview.4 124 9/23/2026
1.0.0-preview.3 106 9/16/2026
1.0.0-preview.2 114 9/15/2026
1.0.0-preview.1 116 9/14/2026
0.60.0 173 9/12/2026
0.50.0 157 9/11/2026
0.40.0 172 9/11/2026
0.35.0 168 9/10/2026
0.34.1 160 9/9/2026
0.34.0 180 9/9/2026
0.33.0 166 9/9/2026
0.32.0 163 9/8/2026
0.31.2 158 9/6/2026
Loading failed