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
In certain scenarios, attempting to build from the commandline with dotnet build gives this error-
The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: System.Data.SqlClient is not supported on this platform.
However, running the project in Visual Studio builds and runs fine, and then you can build from the command line again (until you modify the file at all).
To Reproduce
Using the visual studio ide, create a dotnet core F# console project. Net5.0 framework.
Add the System.Data.SqlClient library along with this one.
Make a valid program that has a connection to a database and click run (can literally just make the connection and leave the hello world stuff, you just need to make sure you have a connection).
Using the terminal, navigate to the project and run dotnet build, it should work.
Change ANYTHING in the code in visual studio. Just add a space to the end of a line. Save.
Using the terminal, dotnet build. Should fail with the above error.
Using visual studio run the code. Should build and run.
Using the terminal, dotnet build. Should build fine.
Vs code is hit or miss with this as well. Working one moment, but if you change the file at all it will fail.
Error
This is on a windows machine but the initial user who brought this error to my attention was on mac (and could not get it to work at all). In my test case i'm connecting to an Azure MS Sql database, i don't know what the other user was using but I don't believe it should matter given the nature of the error.
Expected behavior
Should build/run no matter how you're doing it?
The text was updated successfully, but these errors were encountered:
Issue Summary
In certain scenarios, attempting to build from the commandline with dotnet build gives this error-
The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: System.Data.SqlClient is not supported on this platform.
However, running the project in Visual Studio builds and runs fine, and then you can build from the command line again (until you modify the file at all).
To Reproduce
Using the visual studio ide, create a dotnet core F# console project. Net5.0 framework.
Add the System.Data.SqlClient library along with this one.
Make a valid program that has a connection to a database and click run (can literally just make the connection and leave the hello world stuff, you just need to make sure you have a connection).
Using the terminal, navigate to the project and run dotnet build, it should work.
Change ANYTHING in the code in visual studio. Just add a space to the end of a line. Save.
Using the terminal, dotnet build. Should fail with the above error.
Using visual studio run the code. Should build and run.
Using the terminal, dotnet build. Should build fine.
Vs code is hit or miss with this as well. Working one moment, but if you change the file at all it will fail.
Error
This is on a windows machine but the initial user who brought this error to my attention was on mac (and could not get it to work at all). In my test case i'm connecting to an Azure MS Sql database, i don't know what the other user was using but I don't believe it should matter given the nature of the error.
Expected behavior
Should build/run no matter how you're doing it?
The text was updated successfully, but these errors were encountered: