fsprojects / SQLProvider

A general F# SQL database erasing type provider, supporting LINQ queries, schema exploration, individuals, CRUD operations and much more besides.
https://fsprojects.github.io/SQLProvider
Other
580 stars 146 forks source link

Can't add connection string in fsx file #612

Open tforkmann opened 5 years ago

tforkmann commented 5 years ago

Description

When adding a new connection to the typeprovider like this:

let [<Literal>] CompileTimeConnectionString = "Data Source=..."

type Sql = SqlDataProvider<Common.DatabaseProviderTypes.MSSQLSERVER, ConnectionString = CompileTimeConnectionString, UseOptionTypes=true>

I receiving following error message:

This expression was expected to have type 'System.String'
but here has type 'string'

I used the SqlProvider load script

Repro steps

Please provide the steps required to reproduce the problem

  1. Install latest SqlProvider nuget package with Paket 1.1.62

  2. Add a new fsx file and try to connect to a database

Expected behavior

A string should be accepeted.

Actual behavior

F# string type is not getting accepted.

Known workarounds

None I know off

Related information

Thorium commented 5 years ago

Seems like you mix mscorlib.dll (.net framework) and netstandard.dll somehow