Skip to content

TypeProvider not working with dotnet core 3.0 #645

Closed
@tforkmann

Description

@tforkmann

Description

I'm trying to use the typeprovider with netcoreapp3.0 (3.0.100). But it is not working for me.
I alread tried to reference System.Data.SqlClient.
Ionide is failing as well.

Repro steps

  1. Set up Dotnet core app 3.0

  2. Add SqlProvider

  3. Try to get datacontext

open FSharp.Data.Sql
open System
open Config

/// Query DME
let [<Literal>]  CompileTimeConnectionString = "myconnectionString"

type SqlDme = SqlDataProvider<Common.DatabaseProviderTypes.MSSQLSERVER, ConnectionString=CompileTimeConnectionString, UseOptionTypes=true> //, ContextSchemaPath = ContextSchemaPath>

Expected behavior

TypeProvider should just work

Actual behavior

I get following error message when building the project:
Could not load file or assembly 'System.Data.SqlClient, Version=4.6.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Das System kann die angegebene Datei nicht finden. [C:\Users\tforkmann\Documents\1_Tests\PreveroFeed\src\Server\Server.fsproj]
image

Known workarounds

  1. Add FSharp.Compiler.Tools
  2. Add to fsproj file
    <DotnetFscCompilerPath></DotnetFscCompilerPath>

Related information

  • MS Sql
  • Windows 10
  • netcoreapp3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NET Core reference assembly loadingNot a bug, but a question about usability with .NET Core. Right dlls are not in ResolutionPath.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions