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

Does not build in CLI for .net core 3.1 #687

Open
ZergRushJoe opened this issue Jul 24, 2020 · 5 comments
Open

Does not build in CLI for .net core 3.1 #687

ZergRushJoe opened this issue Jul 24, 2020 · 5 comments

Comments

@ZergRushJoe
Copy link

Describe the bug
Builds in visual studio 2019 but not using "dotnet build" or in Linux container

ERROR:
The type provider 'FSharp.Data.Sql.SqlTypeProvider' reported an error: Could not load type 'System.Data.SqlClient.SqlConnection' from assembly 'System.Data.SqlClient, Version=4.6.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

To Reproduce
Steps to reproduce the behavior:

  1. create a new .net core 3.1 F# console project with SQL provider in it and connect to a SQL server database
  2. build using cli dotnet build

Expected behavior
builds correctly

Screenshots
image

Desktop

  • OS: windows 10
@Thorium
Copy link
Member

Thorium commented Jul 24, 2020

Try adding a reference to System.Data in your project.

@ZergRushJoe
Copy link
Author

ZergRushJoe commented Jul 24, 2020

@Thorium do you mean System.Data.Common or System.Data.SqlClient. I have install both and it still has the same error

@ZergRushJoe
Copy link
Author

Project file

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
    <OutputType>Exe</OutputType>
    ...
  
  <ItemGroup>
    <PackageReference Update="FSharp.Core" Version="4.7.2" />
  </ItemGroup>

  <ItemGroup>
    ....
    <PackageReference Include="Giraffe" Version="4.1.0" />
    <PackageReference Include="Microsoft.AnalysisServices.AdomdClient.NetCore.retail.amd64" Version="19.4.0.2-Preview" />
    <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.1.5" />
    <PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
    <PackageReference Include="SQLProvider" Version="1.1.91" />
    <PackageReference Include="System.Data.Common" Version="4.3.0" />
    <PackageReference Include="System.Data.SqlClient" Version="4.8.1" />
  </ItemGroup>
</Project>

@Thorium
Copy link
Member

Thorium commented Jul 24, 2020

I guess this is duplicate of #580

@Thorium
Copy link
Member

Thorium commented Sep 3, 2020

There has been some issues with System.Data.SqlClient on .Net Core 3.1, so there is the dynamic version: #645 (comment)

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

2 participants