TKWF.CodeGeneration 4.10.27

dotnet add package TKWF.CodeGeneration --version 4.10.27
                    
NuGet\Install-Package TKWF.CodeGeneration -Version 4.10.27
                    
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="TKWF.CodeGeneration" Version="4.10.27">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TKWF.CodeGeneration" Version="4.10.27" />
                    
Directory.Packages.props
<PackageReference Include="TKWF.CodeGeneration">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
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 TKWF.CodeGeneration --version 4.10.27
                    
#r "nuget: TKWF.CodeGeneration, 4.10.27"
                    
#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 TKWF.CodeGeneration@4.10.27
                    
#: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=TKWF.CodeGeneration&version=4.10.27
                    
Install as a Cake Addin
#tool nuget:?package=TKWF.CodeGeneration&version=4.10.27
                    
Install as a Cake Tool

TKWF.Framework — 龙爸出品

领域级 .NET 支撑框架,提供统一的领域驱动基础设施、代码生成器、跨平台客户端支持。

当前版本:4.10.25(目标框架:.NET 10 / .NET 9 / .NET Standard 2.0)


目录结构

_Framework/                  核心框架
├── Core/                    内核(AOP、后台作业接口、事件总线抽象)
├── Domain/                  领域驱动设计抽象(实体、值对象、领域服务、仓储接口)
├── Abstractions/            纯抽象层(接口、枚举、属性、POCO,netstandard2.0)
├── Utility/                 工具库(含 Metrics 计算内核、Tags 标签算法)
├── BackgroundJobs/          后台作业默认实现(DefaultBackgroundJobManager + JobRecord)
├── BackgroundJobs.Hangfire/ 后台作业 Hangfire Provider(可选对接,LGPLv3)
├── BackgroundJobs.Quartz/   后台作业 Quartz Provider(可选对接)
├── EventBus.RabbitMQ/       分布式事件总线传输(RabbitMQ)
└── Outbox/                  事务性 Outbox/Inbox worker

_Domain.Api/                 API 客户端
├── ApiClient/               HTTP 客户端基座(GraphQL 已合并入此)
└── ApiClient.Rest/          RESTful 客户端实现

_Domain.ApiService/          服务端 API 实现
├── Hosting/                 宿主集成
├── MinimalApi/              Minimal API 集成
└── HotChocolate/            GraphQL (HotChocolate) 集成

_Domain.SG/                  源代码生成器
├── ApiService.SG/           服务端源代码生成器
├── ApiClient.SG/            客户端源代码生成器
├── CodeGeneration.Abstractions/  代码生成抽象
└── CodeGeneration/          通用代码生成器

_Domain.Infrastructure/      基础设施实现
├── Web/                     ASP.NET Core 中间件/过滤器
├── Blazor.Abstractions/     Blazor 抽象
├── Blazor.Server/           Blazor Server 组件
├── Blazor.Wasm/             Blazor WebAssembly 组件
├── FreeSql/                 FreeSql ORM 集成
├── EFCore/                  EF Core 适配
└── Maui/                    .NET MAUI 支持

_Domain.Testing/             测试工具
├── xUnit/                   xUnit 测试基类与扩展
└── Mock/                    Mock 基础设施

_xCodeGen/                   CLI 代码生成工具
├── xCodeGen.Core/           生成引擎
└── xCodeGen.Cli/            命令行入口 + 模板 + 脚手架

_Tests/                      测试项目(9 个,见 PROJECT_STRUCTURE.md)

docs/                        框架文档(含 03_扩展模块/ 扩展跟踪、02-迭代开发/ ADR)

完整项目结构、扩展模块总览与迁出历史见 PROJECT_STRUCTURE.md。扩展模块(TKWF.Ext.*)在独立仓库 LoongBa/_TKWF.Extensions

快速开始


<PackageReference Include="TKWF.Domain" Version="4.6.5" />

已知注意事项

  • TKWF.BackgroundJobs.Hangfire(V4.9.104):Hangfire.Core 1.8.18 传递依赖 Newtonsoft.Json。已通过 CPM 钉选 Newtonsoft.Json 13.0.4 缓解已知高危漏洞(NU1903 警告已消除)。Provider 为可选对接(默认进程内实现无此依赖)。

构建要求

  • .NET SDK 10.0+
  • Visual Studio 2022+ / Rider
dotnet restore TKW.Framework.slnx
dotnet build TKW.Framework.slnx -c Release

xCodeGen 工具

代码生成与解决方案脚手架工具(new-solution/add-project/gen),dotnet tool 安装:

dotnet tool install -g TKWF.XCodeGen
xcodegen --help

免费使用(商业许可,禁止再分发——详见 LICENSE)。消费项目生成脚手架/代码经 xcodegen init / xcodegen new-solution 引导。

许可证

分层商业授权模型——Copyright © 2026 LoongBa.cn(洛博网络科技)· 保留所有权利。

内容 授权
开源层 扩展模块(TKWF.Ext.*)/ Demo / Samples 完全开源(独立公开仓库)
免费层 框架 NuGet 二进制 + xCodeGen 基础能力 免费使用(商业许可,禁止再分发
团队版 xCodeGen 授权解锁(次数/高级功能) License Key · 国际 $1,999(活动 $1,799,3 人)· 国内 ¥2,999(3 人)/ 单人 ¥1,500
企业版 主框架源码授权 + 优先支持 国际 $2,999+$1,000 · 国内更贵(发票/税/服务)
旗舰版 企业版全部 + 无限支持 国际 $4,999+$2,000 · 国内更贵

框架 NuGet 包完全免费提供(暂不开源),不阻碍使用与评估;xCodeGen 凭授权解锁能力,免费档能力受限。定价为初期试点(双轨:国际美元对齐 ABP 定价逻辑 + 偏移;国内人民币更便宜),续订 8 折与 ABP 一致(团队版 = $1,799 与活动价一致;企业/旗舰 = 基础费用 8 折 + 偏移),推出后可能调整。加扰防破解仅作鼓励手段,引导正规团队/企业购买"安全、放心、服务"。详见 LICENSEADR77-商业授权与xCodeGen授权控制模型

商业授权请联系 LoongBa.cn。

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.10.27 0 9/15/2026
4.10.26 0 9/15/2026
4.10.25 42 9/14/2026
4.10.24 45 9/14/2026
4.10.19 63 9/13/2026
4.10.14 60 9/12/2026
4.10.13 56 9/12/2026
4.10.12 54 9/12/2026
4.10.11 53 9/11/2026
4.10.10 48 9/11/2026
4.10.9 49 9/11/2026
4.10.8 47 9/11/2026
4.10.7 53 9/11/2026
4.10.6 52 9/11/2026
4.10.4 55 9/10/2026
4.10.3 60 9/10/2026
4.10.2 49 9/10/2026
4.10.1 55 9/10/2026
4.10.0 58 9/10/2026
4.9.79 48 9/10/2026
Loading failed