syncfusion-blazor-license

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Syncfusion Blazor License Configuration

Syncfusion Blazor 许可证配置

Manage Syncfusion Blazor license keys across all project types — Server, WebAssembly, Auto, and Razor Class Libraries.
管理所有项目类型(Server、WebAssembly、Auto和Razor Class Libraries)中的Syncfusion Blazor许可证密钥。

When to Use

适用场景

Use this skill when you need to:
  • Generate a Syncfusion license key (paid, trial, or temporary)
  • Register a license key in any Blazor project type
  • Secure license keys in Blazor WebAssembly projects (avoid browser exposure)
  • Validate licenses in CI/CD pipelines (Azure Pipelines, GitHub Actions, Jenkins)
  • Troubleshoot license errors — trial banner, invalid key, platform or version mismatch
Do NOT use for:
  • Initial Blazor project setup → use
    syncfusion-blazor-common
当你需要以下操作时使用本技能:
  • 生成Syncfusion许可证密钥(付费版、试用版或临时版)
  • 在任意Blazor项目类型中注册许可证密钥
  • 在Blazor WebAssembly项目中保护许可证密钥(避免在浏览器中暴露)
  • 在CI/CD流水线(Azure Pipelines、GitHub Actions、Jenkins)中验证许可证
  • 排查许可证错误——试用版横幅、无效密钥、平台或版本不匹配
请勿用于:
  • Blazor项目初始设置 → 请使用
    syncfusion-blazor-common

Quick Reference

快速参考

TopicReference
Generate Keylicense-registration.md — Part 1
Register Keylicense-registration.md — Part 2
Razor Class Librarylicense-registration.md — Part 3
WASM Securitylicense-registration.md — Part 4
Troubleshootinglicense-registration.md — Part 5
FAQlicense-registration.md — Part 6
主题参考链接
生成密钥license-registration.md — 第一部分
注册密钥license-registration.md — 第二部分
Razor类库license-registration.md — 第三部分
WASM安全license-registration.md — 第四部分
故障排查license-registration.md — 第五部分
常见问题license-registration.md — 第六部分

Prerequisites

前提条件

  • Syncfusion account (start a free trial if needed)
  • Syncfusion NuGet packages installed in the project
  • Access to
    Program.cs
    of the server and/or client project
Key rules: License keys are version-specific and platform-specific. Always generate a key for the Blazor platform that matches your installed NuGet package version.
NOTE: DON'T ask user to share their license key if they encounter errors. Instead, guide them to generate a new key and register it correctly. License keys are confidential and should never be shared publicly.
  • Syncfusion账户(如有需要可开始免费试用
  • 项目中已安装Syncfusion NuGet包
  • 可访问服务器和/或客户端项目的
    Program.cs
关键规则:许可证密钥是版本特定平台特定的。请始终为与已安装NuGet包版本匹配的Blazor平台生成密钥。
注意:如果用户遇到错误,不要要求他们分享许可证密钥。相反,指导他们重新生成密钥并正确注册。许可证密钥是机密信息,绝对不能公开分享。

1. Generate a License Key

1. 生成许可证密钥

Detailed guide: license-registration.md — Part 1
Account StatusPortalKey Type
Active paidLicense & DownloadsFull, no expiry
Active trialTrial & Downloads30-day trial
ExpiredLicense & DownloadsTemporary 5-day
No accountRegister then Start Trial30-day trial
详细指南license-registration.md — 第一部分
账户状态门户密钥类型
有效付费账户许可证与下载完整版,无到期时间
有效试用账户试用与下载30天试用版
已过期许可证与下载5天临时版
无账户注册开始试用30天试用版

2. Register the License Key

2. 注册许可证密钥

Detailed guide: license-registration.md — Part 2
Register before any Syncfusion component initializes in
Program.cs
:
csharp
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");
详细指南license-registration.md — 第二部分
Program.cs
所有Syncfusion组件初始化之前注册:
csharp
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");

Registration by Project Type

按项目类型注册

Project TypeWhere to Register
Interactive ServerServer
Program.cs
only
Interactive AutoServer and Client
Program.cs
Interactive WASMServer and Client
Program.cs
Standalone WASMClient
Program.cs
only
Razor Class LibraryConsuming app's
Program.cs
项目类型注册位置
Interactive Server仅服务器端
Program.cs
Interactive Auto服务器端客户端
Program.cs
Interactive WASM服务器端客户端
Program.cs
Standalone WASM仅客户端
Program.cs
Razor Class Library消费应用的
Program.cs

3. WASM Security — Licensed NuGet Packages

3. WASM安全——授权版NuGet包

Detailed guide: license-registration.md — Part 4
⚠️ Security Issue: Registering license keys in WASM
Program.cs
exposes them in browser-downloadable assemblies. Use licensed NuGet packages instead.
详细指南license-registration.md — 第四部分
⚠️ 安全问题:在WASM的
Program.cs
中注册许可证密钥会导致密钥暴露在浏览器可下载的程序集中。请改用授权版NuGet包。

Recommended Solution

推荐解决方案

Use licensed NuGet packages (no key registration needed):
  1. Download from web installer
  2. Configure local/private NuGet source
  3. Verify DLL properties: No "LR" in file description = licensed
If trial assemblies persist:
bash
dotnet nuget locals all --clear
使用授权版NuGet包(无需注册密钥):
  1. Web安装程序下载
  2. 配置本地/私有NuGet源
  3. 验证DLL属性:文件描述中无“LR”即为授权版
如果试用版程序集仍然存在
bash
dotnet nuget locals all --clear

Delete bin/ and obj/, rebuild

删除bin/和obj/文件夹,重新构建

undefined
undefined

Alternative: Azure Key Vault

替代方案:Azure Key Vault

Store keys in Azure Key Vault and retrieve at runtime
将密钥存储在Azure Key Vault中并在运行时获取

4. CI License Validation

4. CI许可证验证

Detailed guide: license-registration.md — Part 5
详细指南license-registration.md — 第五部分

LicenseKeyValidator Tool

LicenseKeyValidator工具

  1. Download LicenseKeyValidator.zip
  2. Edit
    LicenseKeyValidation.ps1
    :
    powershell
    $result = & $PSScriptRoot"\LicenseKeyValidatorConsole.exe" /platform:"Blazor" /version:"26.2.4" /licensekey:"Your Key"
    Write-Host $result
  3. Integrate into Azure Pipelines, GitHub Actions, or other CI systems
  1. 下载LicenseKeyValidator.zip
  2. 编辑
    LicenseKeyValidation.ps1
    powershell
    $result = & $PSScriptRoot"\LicenseKeyValidatorConsole.exe" /platform:"Blazor" /version:"26.2.4" /licensekey:"Your Key"
    Write-Host $result
  3. 集成到Azure Pipelines、GitHub Actions或其他CI系统中

Programmatic Validation

程序化验证

csharp
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_KEY");
bool isValid = SyncfusionLicenseProvider.ValidateLicense(Platform.Blazor);
csharp
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_KEY");
bool isValid = SyncfusionLicenseProvider.ValidateLicense(Platform.Blazor);

5. Troubleshooting License Errors

5. 排查许可证错误

Detailed guide: license-registration.md — Part 6
ErrorCauseFix
Trial bannerKey not registeredRegister before component init
Invalid keyWrong version/platformRegenerate for Blazor + current NuGet version
Platform mismatchNon-Blazor keyGenerate Blazor-specific key
Version mismatchKey ≠ package versionClean bin/obj, clear NuGet cache, rebuild
详细指南license-registration.md — 第六部分
错误原因解决方法
试用版横幅未注册密钥在组件初始化之前注册
无效密钥版本/平台错误为Blazor和当前NuGet版本重新生成密钥
平台不匹配使用了非Blazor密钥生成Blazor专用密钥
版本不匹配密钥与包版本不一致清理bin/obj文件夹,清除NuGet缓存,重新构建

Quick Checklist

快速检查清单

  1. Syncfusion.Licensing
    version matches other packages
  2. ✓ Key registered before component initialization
  3. ✓ Key platform is Blazor
  4. ✓ Key version matches installed NuGet version
  1. Syncfusion.Licensing
    版本与其他包匹配
  2. ✓ 密钥在组件初始化之前注册
  3. ✓ 密钥平台为Blazor
  4. ✓ 密钥版本与已安装NuGet版本匹配