# Plan: 升级 Fengling.Platform 包到最新 ## 任务描述 升级 fengling-gateway 项目中的 Fengling.Platform.Infrastructure 包到最新版本,并修复现有编译警告。 ## 变更分析 ### fengling-platform 新版本主要变更 1. **主键类型变更**:从 `long Id` 改为 `string Id`(Guid) 2. **新增 GwCluster 聚合根**:包含内嵌 Destinations 列表 3. **GwTenantRoute 扩展**:新增 Match (GwRouteMatch)、Transforms 等字段 4. **移除GwServiceInstance**:作为 GwCluster 的内嵌值对象 GwDestination 5. **新增值对象**:GwRouteMatch、GwTransform、GwLoadBalancingPolicy、GwHealthCheckConfig、GwSessionAffinityConfig ### 当前编译警告 1. **CS0108**: GatewayDbContext.Tenants 隐藏继承成员 PlatformDbContext.Tenants 2. **NU1506**: 重复 PackageVersion 定义 3. **NU1507**: 配置了多个包源 ## 任务列表 ### Task 1: 分析并修复 CS0108 警告 - **文件**: src/yarpgateway/Data/GatewayDbContext.cs - **操作**: 将 `Tenants` 属性添加 `new` 关键字,或使用不同的名称避免隐藏 - **验证**: dotnet build 无 CS0108 警告 ### Task 2: 修复 NU1506 重复包版本警告 - **文件**: Directory.Packages.props 或 YarpGateway.csproj - **操作**: 检查并移除重复的 PackageVersion 定义 - **验证**: dotnet restore 无 NU1506 警告 ### Task 3: 配置包源映射解决 NU1507 - **文件**: NuGet.Config 或 Directory.Build.props - **操作**: 添加包源映射配置 - **验证**: dotnet restore 无 NU1507 警告 ## 验证 - dotnet build 成功,0 错误 - 无 CS0108、NU1506、NU1507 警告