Skip to content

Microsoft.Data.SqlClient with SSDT? #751

Open
@NickDarvey

Description

@NickDarvey

Description

I'm wanting to use Microsoft.Data.SqlClient with the SSDT Provider. The documentation say I need to use MSSQLSERVER_DYNAMIC, but is it possible with MSSQLSERVER_SSDT?

I've read the instructions in #645 and included the appropriate assemblies in a folder and set it as the resolutionPath. However, it fails trying to load System.Data.SqlClient.

Repro steps

[<Literal>]
let private Schema = __SOURCE_DIRECTORY__ + @"/../DatabaseProject/bin/Debug/DatabaseProject.dacpac"

type Schema = 
  SqlDataProvider<
    Common.DatabaseProviderTypes.MSSQLSERVER_SSDT, 
    SsdtPath = Schema,
    UseOptionTypes = true
  >

let create (connectionString: string) =
  Schema.GetDataContext(connectionString, resolutionPath = @"C:\testing\runtimes")

Expected behaviour

Please provide a description of the behaviour you expect.

Actual behaviour

System.IO.FileNotFoundException: 'Could not load file or assembly 'System.Data.SqlClient, Version=4.6.1.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.'

Known workarounds

None.

Related information

  • Operating system
    • windows [19043.1288]
    • macOs [insert version]
    • linux [insert flavor/version here]
  • Platform
    • dotnet core [5.0.104]
    • dotnet full
    • mono
  • Branch or release version [1.2.10]

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