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

SqlCommandProvider type provider constructor exception when using dotnet CLI #307

Closed
panesofglass opened this issue Jul 9, 2018 · 3 comments

Comments

@panesofglass
Copy link
Contributor

panesofglass commented Jul 9, 2018

Description

After updating fsproj files to the new format and targeting net461, dotnet build *.fsproj fails with the following error:

error FS3053 : The type provider 'FSharp.Data.SqlCommandProvider' reported an error : The type provider constructor has thrown an exception: Exception has been thrown by the target of an invocation. [*.fsproj]
FSC : warning FS3005: Referenced assembly 'C:\Users\ryan\.nuget\packages\fsharp.data.sqlclient\1.8.2\lib\net40\FSharp.Data.SqlClient.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [*.fsproj]

Repro steps

  1. Update fsproj from old format to new format, targeting net461.

  2. Attempt to build the project with the dotnet build command.

Expected behavior

Successful build.

Actual behavior

error FS3053 : The type provider 'FSharp.Data.SqlCommandProvider' reported an error : The type provider constructor has thrown an exception: Exception has been thrown by the target of an invocation. [*.fsproj]
FSC : warning FS3005: Referenced assembly 'C:\Users\ryan\.nuget\packages\fsharp.data.sqlclient\1.8.2\lib\net40\FSharp.Data.SqlClient.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [*.fsproj]

Known workarounds

Build with MSBuild.exe rather than the dotnet cli.

Related information

  • Operating system
  • Branch
  • Database versions and sample databases being used
  • .NET Runtime, CoreCLR or Mono Version
  • Editing Tools (e.g. Visual Studio Version)
  • Lins to F# RFCs or entries on http://fslang.uservoice.com
@samhanes
Copy link
Contributor

@panesofglass Is this resolved in version 2.0.1?

@panesofglass
Copy link
Contributor Author

I'll try it next week. I haven't had a chance to update yet.

@panesofglass
Copy link
Contributor Author

Looks like this is fixed! Thanks!

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