Skip to content

[Microsoft,System].Data.SqlClient is not supported on this platform #786

@moh-incom

Description

@moh-incom

Describe the bug
SqlDataProvider gives compile error related to the use of Microsoft.Data.SqlClient in a fresh install of Console template in F# .Net 6.0.113 on Ubuntu 22.04.
Problem is reported as Microsoft.Data.SqlClient is not supported on this platform in VS Code,
but when compiled using .Net CLI, the error is System.Data.SqlClient is not supported on this platform.

To Reproduce
Steps to reproduce the behavior:

  1. Create fresh F# .Net 6.0 Console project
  2. Install SqlProvider and Microsoft.Data.SqlClient packages through Nuget
  3. Use the following code in Program.fs:
open FSharp.Data.Sql


[<Literal>]
let connectionString = "Server=test;DATABASE=testdb;User=user1;Password=1234;"

type sql =
    SqlDataProvider<UseOptionTypes=Common.NullableColumnType.OPTION, ConnectionString=connectionString, DatabaseVendor=Common.DatabaseProviderTypes.MSSQLSERVER>
  1. Observe error when running dotnet run and/or look at problems reported in highlights in IDE (VS Code)

Expected behavior
I expected the program to compile.

Screenshots
Not applicable.

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • IDE: VS Code 1.74.2 with Ionide 7.4.0
  • Browser (not applicable?): Firefox 109.0.1

Additional context
Might be related to this problem:
#771

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions