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

Can't build/run from the commandline, but can from Visual Studio 2019 #408

Closed
Eji1700 opened this issue Jun 2, 2021 · 2 comments
Closed
Assignees

Comments

@Eji1700
Copy link

Eji1700 commented Jun 2, 2021

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?

@jackfoxy
Copy link

jackfoxy commented Jun 2, 2021

Related to this #380
But it is really all about this #374

Sadly this project is stuck on old .NET Framework. It's a non-trivial project to get it up to net5.0

@Eji1700
Copy link
Author

Eji1700 commented Jun 2, 2021

Ahh ok. At least i'm not going crazy. I'll close since this is a dupe then.

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

3 participants