syncfusion-blazor-license
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSyncfusion 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
快速参考
| Topic | Reference |
|---|---|
| Generate Key | license-registration.md — Part 1 |
| Register Key | license-registration.md — Part 2 |
| Razor Class Library | license-registration.md — Part 3 |
| WASM Security | license-registration.md — Part 4 |
| Troubleshooting | license-registration.md — Part 5 |
| FAQ | license-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 of the server and/or client project
Program.cs
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 Status | Portal | Key Type |
|---|---|---|
| Active paid | License & Downloads | Full, no expiry |
| Active trial | Trial & Downloads | 30-day trial |
| Expired | License & Downloads | Temporary 5-day |
| No account | Register then Start Trial | 30-day trial |
2. Register the License Key
2. 注册许可证密钥
Detailed guide: license-registration.md — Part 2
Register before any Syncfusion component initializes in :
Program.cscsharp
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");详细指南:license-registration.md — 第二部分
在中所有Syncfusion组件初始化之前注册:
Program.cscsharp
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY");Registration by Project Type
按项目类型注册
| Project Type | Where to Register |
|---|---|
| Interactive Server | Server |
| Interactive Auto | Server and Client |
| Interactive WASM | Server and Client |
| Standalone WASM | Client |
| Razor Class Library | Consuming app's |
| 项目类型 | 注册位置 |
|---|---|
| Interactive Server | 仅服务器端 |
| Interactive Auto | 服务器端和客户端 |
| Interactive WASM | 服务器端和客户端 |
| Standalone WASM | 仅客户端 |
| Razor Class Library | 消费应用的 |
3. WASM Security — Licensed NuGet Packages
3. WASM安全——授权版NuGet包
Detailed guide: license-registration.md — Part 4
⚠️ Security Issue: Registering license keys in WASM exposes them in browser-downloadable assemblies. Use licensed NuGet packages instead.
Program.cs详细指南:license-registration.md — 第四部分
⚠️ 安全问题:在WASM的中注册许可证密钥会导致密钥暴露在浏览器可下载的程序集中。请改用授权版NuGet包。
Program.csRecommended Solution
推荐解决方案
Use licensed NuGet packages (no key registration needed):
- Download from web installer
- Configure local/private NuGet source
- Verify DLL properties: No "LR" in file description = licensed
If trial assemblies persist:
bash
dotnet nuget locals all --clear使用授权版NuGet包(无需注册密钥):
- 从Web安装程序下载
- 配置本地/私有NuGet源
- 验证DLL属性:文件描述中无“LR”即为授权版
如果试用版程序集仍然存在:
bash
dotnet nuget locals all --clearDelete bin/ and obj/, rebuild
删除bin/和obj/文件夹,重新构建
undefinedundefinedAlternative: 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工具
- Download LicenseKeyValidator.zip
- Edit :
LicenseKeyValidation.ps1powershell$result = & $PSScriptRoot"\LicenseKeyValidatorConsole.exe" /platform:"Blazor" /version:"26.2.4" /licensekey:"Your Key" Write-Host $result - Integrate into Azure Pipelines, GitHub Actions, or other CI systems
- 下载LicenseKeyValidator.zip
- 编辑:
LicenseKeyValidation.ps1powershell$result = & $PSScriptRoot"\LicenseKeyValidatorConsole.exe" /platform:"Blazor" /version:"26.2.4" /licensekey:"Your Key" Write-Host $result - 集成到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
| Error | Cause | Fix |
|---|---|---|
| Trial banner | Key not registered | Register before component init |
| Invalid key | Wrong version/platform | Regenerate for Blazor + current NuGet version |
| Platform mismatch | Non-Blazor key | Generate Blazor-specific key |
| Version mismatch | Key ≠ package version | Clean bin/obj, clear NuGet cache, rebuild |
详细指南:license-registration.md — 第六部分
| 错误 | 原因 | 解决方法 |
|---|---|---|
| 试用版横幅 | 未注册密钥 | 在组件初始化之前注册 |
| 无效密钥 | 版本/平台错误 | 为Blazor和当前NuGet版本重新生成密钥 |
| 平台不匹配 | 使用了非Blazor密钥 | 生成Blazor专用密钥 |
| 版本不匹配 | 密钥与包版本不一致 | 清理bin/obj文件夹,清除NuGet缓存,重新构建 |
Quick Checklist
快速检查清单
- ✓ version matches other packages
Syncfusion.Licensing - ✓ Key registered before component initialization
- ✓ Key platform is Blazor
- ✓ Key version matches installed NuGet version
- ✓ 版本与其他包匹配
Syncfusion.Licensing - ✓ 密钥在组件初始化之前注册
- ✓ 密钥平台为Blazor
- ✓ 密钥版本与已安装NuGet版本匹配