# Quick Task 001 Summary: 升级 Fengling.Platform 包并修复编译警告 ## 任务概述 升级 fengling-gateway 项目中的 Fengling.Platform.Infrastructure 包引用,并修复编译警告。 ## 变更内容 ### 1. 修复 CS0108 警告 **文件**: `src/yarpgateway/Data/GatewayDbContext.cs` **问题**: `GatewayDbContext.Tenants` 隐藏了继承的成员 `PlatformDbContext.Tenants` **修复**: 添加 `new` 关键字明确表示新定义 ```csharp // 修复前 public DbSet Tenants => Set(); // 修复后 public new DbSet Tenants => Set(); ``` ### 2. 修复 NU1506 重复 PackageVersion **文件**: `src/yarpgateway/Directory.Packages.props` **问题**: 重复定义了 Microsoft.AspNetCore.Authentication.JwtBearer、Microsoft.EntityFrameworkCore.Design、Microsoft.EntityFrameworkCore **修复**: 移除重复的 PackageVersion 定义 ### 3. 修复 NU1507 多个包源警告 **文件**: 根目录创建 `NuGet.Config` **问题**: 配置了多个包源(gitea、nuget.org),需要包源映射 **修复**: 添加 packageSourceMapping 配置到 NuGet.Config,并删除子目录中的重复配置 ## 构建结果 - ✅ 0 错误 - ✅ CS0108 警告已修复 - ✅ NU1506 警告已修复 - ✅ NU1507 警告已修复 - ⚠️ MSB3277 警告(EntityFrameworkCore.Relational 版本冲突)- 来自测试项目依赖,不影响构建 ## 相关文件 - `src/yarpgateway/Data/GatewayDbContext.cs` - 添加 new 关键字 - `src/yarpgateway/Directory.Packages.props` - 移除重复包版本 - `src/yarpgateway/Directory.Build.props` - 添加包源映射 - `tests/Directory.Build.props` - 添加包源映射 - `NuGet.Config` - 新建包源映射配置