PCLN.Plugin.i18n 0.2.4

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

PCL N Plugin SDK

PCL N 第三方插件的公开契约、开发工具、分析器、测试宿主和 .pnp 构建工具。

当前版本:0.2.4

NuGet 包 用途
PCLN.Plugin.Abstractions 插件入口、生命周期、服务、Manifest 和 UI 公共 ABI
PCLN.Plugin.i18n 强类型本地化文本和本地化设置页契约
PCLN.Plugin.UI UI Target、导航和页面注册的稳定契约
PCLN.Plugin.UI.Avalonia 受权限控制的 Raw Avalonia、页面和窗口契约
PCLN.Plugin.Sdk Manifest 验证、SemVer 范围和开发辅助 API
PCLN.Plugin.Analyzers PNPSDK001–010 编译诊断
PCLN.Plugin.Testing 内存服务与生命周期测试宿主
PCLN.Plugin.Sdk.Build 可复现 .pnp 打包和 OpenPGP/GPG 签名

NuGet 包 ID 使用 PCLN.Plugin.*;为保持源码和二进制兼容,程序集名与命名空间仍使用 PCL.N.Plugin.*

PCL.Plugin 是 PCL-N 的私有特权 Host,不属于公共 SDK。第三方插件不得引用 PCL.ApplicationPCL.DesktopPCL.Plugin

快速开始

安装 .NET 10 SDK,然后参考 examples/HelloPlugin。示例展示:

  • IPclNPlugin 生命周期;
  • 命令和设置页注册;
  • Manifest UI Patch 声明;
  • 无代码隐藏的声明式 AXAML;
  • Release 构建生成平台无关的 AnyCPU .pnp,并支持 runtimes/<rid>/native/ 多架构原生资产。
dotnet restore PCL-N-Plugin-SDK.slnx
dotnet build PCL-N-Plugin-SDK.slnx -c Release -warnaserror
dotnet test PCL-N-Plugin-SDK.slnx -c Release --no-build

正式插件包必须签名。开发构建可以显式设置:

<PclNPluginSign>false</PclNPluginSign>

该设置不会生成未签名包:构建工具会创建并使用本机开发密钥。开发签名包可以本地安装,但不得提交插件市场;运行时不提供“允许未签名插件”开关。

插件中心使用双层签名:开发者上传自己的 OpenPGP 自签名候选包;审核通过后,网站保留开发者签名并生成带 META-INF/market/ 网站签名封套的新分发包。PCL 从市场安装时会对最终包计算 SHA-256,并向 POST /v1/packages/verify 在线核对发布者、命名空间、双指纹和吊销状态;验证服务不可用时拒绝首次安装。

AXAML UI

Manifest 的 UI operation 可以引用包内 ui/*.axaml

{
  "id": "hello-panel",
  "kind": "inject",
  "slot": "cards.flip",
  "axaml": "ui/HelloPanel.axaml",
  "command": "dev.muxue.hello.say-hello"
}

首版只支持声明式 AXAML:禁止 x:Class、代码隐藏和 PCL-N 私有 CLR 命名空间。行为通过公开命令 ID 和 Host 提供的公开绑定上下文连接。

文档

版本化 Wiki 源文件位于 wiki/,发布工作流会同步到 GitHub Wiki。同一套详细文档也发布到 docs.pcln.top

Manifest Schema 位于 schemas/plugin.schema.json

CI 与发布

CI 在 Windows、Linux 和 macOS 上构建与测试,并验证八个 NuGet 包、示例 .pnp、AXAML 资源和可复现输出。sdk-v* Tag 经 nuget-production 环境审批后发布 NuGet 并同步 Wiki。

Licensed under the Apache License 2.0.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PCLN.Plugin.i18n:

Package Downloads
PCLN.Plugin.UI

Stable UI target, navigation, page, window, and composition contracts for PCL N plugins.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.4 52 7/20/2026
0.2.3 72 7/19/2026
0.2.1 72 7/18/2026