microsoft / microsoft/sqlmanagementobjects
net8.0 + Microsoft.Data.SqlClient <5.2.0 incompatibility
还没有人认领这个 Issue。
- 主要语言
- C#
- 星标
- 143
- 派生
- 28
- PR 合并指标
- 30 天内没有已合并 PR
描述
Microsoft.SqlServer.SqlManagementObjects 171.30.0 depends on Microsoft.Data.SqlClient 5.1.4. Upgrading a tests project from net6.0 to net8.0 produces the following exception
OneTimeSetUp: System.Reflection.ReflectionTypeLoadException : Unable to load one or more of the requested types.
Could not load type 'SqlGuidCaster' from assembly 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field.
----> System.TypeLoadException : Could not load type 'SqlGuidCaster' from assembly 'Microsoft.Data.SqlClient, Version=5.0.0.0, Culture=neutral, PublicKeyToken=23ec7fc2d6eaa4a5' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field.
Upgrading to Microsoft.Data.SqlClient 5.2.0 fixes the issue, as documented here: https://github.com/dotnet/SqlClient/issues/1930
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位测试项目及其 Microsoft.SqlServer.SqlManagementObjects 依赖项。使用 Microsoft.Data.SqlClient 5.1.4 重现 net8.0 测试启动失败,然后验证使用 5.2.0 版本可以成功加载测试。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- csharp, sql
- 领域
- databases
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100