You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: dotnet/SqlClient#1930
The text was updated successfully, but these errors were encountered:
thx for opening an issue. We move pretty slowly on SMO dependency updates but it should be fine for apps to use 5.2 if it solves their problems.
Note that it introduces another problem per #162
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: dotnet/SqlClient#1930
The text was updated successfully, but these errors were encountered: