-
Notifications
You must be signed in to change notification settings - Fork 146
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
The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: System.Data.SqlClient is not supported on this platform #771
Comments
I work on .NET 6 with macos without any problems. |
Have you referenced System.Data.SqlClient via .NET platform or via NuGet? |
@Thorium Via NuGet. I also tried with Microsoft.Data.SqlClient |
same here. The moment I ran this (Alt + F10) I get the same Error. I am using VS 2022. The Script in VS shows no error and resolve the colums correctly. The Moment I ran this script with "dotnet fsi" or with "Alt + F10" the error message appears. I use "nuget: SQLProvider" (which is currently 1.3.3) It always ends up in:
I didn't try MSSQL_DYNAMIC yet. |
The version 1.3.5 is now using Microsoft.Data.SqlClient on .Net6.0 and .NetStandard 2.1, |
The same project that worked in VS doesn’t work in the other IDEs? |
If you check from Nuget, there:
So if it says X is not supported, then it would hint the editor itself is running on mode which is not compatible. Now, VS has its own F# things under its program folders. Where as the others have to resolve F# compiler (fsc.exe) via some other way like env-variable and they typically point to your dotnet-sdk folder. We can switch whatever we want, e.g. design-time use System and runtime Microsoft, if that would work. We just have to find working combinations. |
how do i figure out what platform or mode the others are running? how do i change it? should i? |
@Thorium i still cannot get this to work outside of visual studio. interestingly it's not just design time stuff within neovim and vscode. It also does not build from a dotnet build or dotnet run command. I think there's an issue with it not using ms build? Where would you start digging in to try to change it's behavior here? I'm willing to monkey around with it, I really need this to work, I would just like a few pointers as to what might affect this and where in the code to change things. |
In the original issue, what is the part "Add a reference #r to the netstandard2.0 dll."? If your project targets to .NET6 (which is .NET Standard 2.1) then Microsoft.Data.SqlClient should be supported. But intellisense is using compiler, so it's compile-time, not runtime. So this hints to me that the compiler used is not .NET 6 / .NetStandard 2.1, but something else. Visual Studio uses its own magic to figure out the compiler path for it, and depending on your VS it can be something like: And then, the other tools are using general environment variables to detect the version, and they are using something like: I'm not familiar where editors pick their compiler paths, probably from environment settings. You could try to play with setting a property of |
Describe the bug
Cannot execute a query in a .net 6 project.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Expect to see the query result in the output window.
Desktop (please complete the following information):
Additional context
Is .NET 6 supported ?
The text was updated successfully, but these errors were encountered: