CYLicense.Client
1.0.1
dotnet add package CYLicense.Client --version 1.0.1
NuGet\Install-Package CYLicense.Client -Version 1.0.1
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="CYLicense.Client" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CYLicense.Client" Version="1.0.1" />
<PackageReference Include="CYLicense.Client" />
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 CYLicense.Client --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: CYLicense.Client, 1.0.1"
#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 CYLicense.Client@1.0.1
#: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=CYLicense.Client&version=1.0.1
#tool nuget:?package=CYLicense.Client&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CYLicense.Client
深圳诚亿智能股份有限公司出品的 软加密 / 许可证验证客户端库,供 Windows 业务程序在启动与运行时校验许可证。
公司信息
| 项 | 内容 |
|---|---|
| 公司 | 深圳诚亿智能股份有限公司 |
| 官网 | https://www.szcomwin.com/ |
| 作者 | Remmant John |
| 邮箱 | chengyi@szcomwin.com |
作用说明
CYLicenseClient 是面向 .NET 应用的许可证客户端组件,主要能力包括:
- 启动前检查签名/许可文件是否存在(
CheckLicenseFiles) - 支持节点锁定(基于硬件标识)
- 支持试用期倒计时与到期前预警
- 支持通过 XML 续期包更新许可证
- 提供许可证对话框(
LicenseDialog)与品牌 Logo 配置(Branding)
业务程序通过 NuGet 引用本包后,在启动阶段调用验证 API,即可完成软加密授权检查。
默认路径
相对宿主程序 AppDomain.CurrentDomain.BaseDirectory:
| 用途 | 路径 |
|---|---|
| 签名文件 | License\signature.bin |
| 许可文件 | License\license.bin |
| XML 续期临时文件 | License\license_renewal.xml |
| 日志 | Logs\license\license_error.log |
部署时请将 Server 端生成的 signature.bin、license.bin 复制到程序目录下的 License 文件夹。
快速使用
using CYLicenseClient;
Branding.CompanyName = "深圳诚亿智能股份有限公司";
Branding.ProductName = "您的产品名称";
LicenseService.SecretKey = "与Server一致的SecretKey";
LicenseService.ApiKey = "offline-server-api-key";
// 1. 检查签名文件与许可文件是否存在
if (!LicenseService.CheckLicenseFiles(out var missingMsg))
{
MessageBox.Show(missingMsg, "许可证文件缺失",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
// 2. 完整验证
var result = await LicenseService.ValidateWithResultAsync();
if (!result.IsValid)
{
LicenseDialog.Show(result);
return;
}
运行要求
- .NET 8(
net8.0-windows) - 使用对话框 UI 时需启用 Windows Forms
配套组件
- CYLicense.Client(本包):业务端验证库
联系方式
如有授权集成、签发流程或技术问题,请联系:
- 邮箱:chengyi@szcomwin.com
- 官网:https://www.szcomwin.com/
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0-windows7.0 is compatible. net9.0-windows 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.
-
net8.0-windows7.0
- Aegis (>= 1.4.0)
- System.Management (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.