Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet 8.0.100-preview.6.23330.14 error. #800

Open
WillEhrendreich opened this issue Jul 20, 2023 · 12 comments
Open

dotnet 8.0.100-preview.6.23330.14 error. #800

WillEhrendreich opened this issue Jul 20, 2023 · 12 comments

Comments

@WillEhrendreich
Copy link
Contributor

Describe the bug
when I try to build with dotnet 8.0.100-preview.6.23330.14 sdk i get this error:

The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Un
able 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, PublicKeyTo
ken=23ec7fc2d6eaa4a5' because it contains an object field at offset 0 that is incorrectly aligned or overlapped by a non-object field.Details: Could not load type 'SqlGu
idCaster' 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.Current execution platform: .NETCoreApp,Version=v6.0

To Reproduce
Steps to reproduce the behavior:
have a dotnet 8 sdk project.
use mssql
try to build

Expected behavior
i expect it to build

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser not applicable

Additional context
None

@Thorium
Copy link
Member

Thorium commented Jul 20, 2023

Sounds pretty much underlying driver problem.

Could be related:
dotnet/SqlClient#1930

@Thorium
Copy link
Member

Thorium commented Oct 8, 2023

Do you still have the issue?

I'm running on 8.0.100-rc.1.23463.5 and Microsoft.Data.SqlClient 5.1.1 and all works well.

@WillEhrendreich
Copy link
Contributor Author

I'll check. :)

@WillEhrendreich
Copy link
Contributor Author

Still have problems..
[]
let ResolutionPath = SOURCE_DIRECTORY + """\SqlProvider"""

type sql =
SqlDataProvider<DatabaseVendor=Common.DatabaseProviderTypes.MSSQLSERVER_DYNAMIC, ResolutionPath=ResolutionPath, ConnectionString=cs>

when i try to run dotnet build, i get this:

FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: 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.Details: 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.Current execution platform: .NETCoreApp,Version=v6.0

FS3033: The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: 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.Details: 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.Current execution platform: .NETCoreApp,Version=v6.0

interestingly, no problems are showing in Neovim. no diagnostics. It's apparently fine there..

In summary...
(╯°□°)╯︵ ┻━┻

@WillEhrendreich
Copy link
Contributor Author

and switching back to dotnet 7.0.401 has no problems with dotnet build.

@famda
Copy link

famda commented Oct 10, 2023

I'm also having this issue.
How can I bypass this issue?

@Thorium
Copy link
Member

Thorium commented Oct 10, 2023

Oh, I was using the MSSQLSERVER_SSDT

@Thorium
Copy link
Member

Thorium commented Oct 19, 2023

hi, can you try with 1.3.19 please, there should be a fix now.

@WillEhrendreich
Copy link
Contributor Author

I'll have to try that, next week. thanks for working on it!

@ronwarner
Copy link

hi, can you try with 1.3.16 please, there should be a fix now.

What does this version apply to... a package, an SDK? I'm using the following and still have this issue:

SDK 8.0.100-rc.2.23502.2
Microsoft.Data.SqlClient 5.1.2
CoreCLR Version: 8.0.23.47906 (on Azure App Service)
.NET Version: 8.0.0-rc.2.23479.6 (on Azure App Service)

@knocte
Copy link

knocte commented Nov 21, 2023

What does this version apply to... a package, an SDK?

I assume he meant the SqlProvider version of the nuget package: https://www.nuget.org/packages/SQLProvider/#versions-body-tab

I'm using the following and still have this issue

You missed specifying SqlProvider version.

@Thorium
Copy link
Member

Thorium commented Nov 21, 2023

Just use the .Net 8 and the latest version. But more the question is are you using the MSSQL or MSSQL_DYNAMIC or MSSQL_SSDT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants