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

Type provider assembly error on TypeProviderAssemblyAttribute and FSharp.Core (netcoreapp2.2 + paket) #637

aggieben opened this issue Sep 10, 2019 · 0 comments


Copy link

commented Sep 10, 2019


I have failing builds as well as broken intellisense that appears to stem from the following issues:

The type provider 'C:\Users\ben\.nuget\packages\sqlprovider\1.1.66\lib\netstandard2.0\FSharp.Data.SqlProvider.dll' 
reported an error: Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer 
which cannot be loaded or doesn't exist. Could not load file or assembly 
'FSharp.Core, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one 
of its dependencies. The system cannot find the file specified. F# Compiler(3031)
Referenced assembly 'C:\Users\ben\.nuget\packages\sqlprovider\1.1.66\lib\netstandard2.0\FSharp.Data.SqlProvider.dll' 
has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' 
but no public type provider classes were found F# Compiler(3005)

Apologies for the odd formatting. Here's a screencap if that's easier:

The part of this that has my scratching my head the most is why FSharp.Core fails to load.

I created this project using forge, but it's just using modified CLI templates for new projects. My .fsproj:

<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
    <Compile Include="Db.fs" />
    <Compile Include="Program.fs" />
    <None Include="App.config" />
  <Import Project="..\..\.paket\Paket.Restore.targets" />

And my paket.dependencies:


framework: >= netstandard2.0
nuget FSharp.Core
nuget Npgsql
nuget SQLProvider

group Build

nuget FAKE

The versions reported in paket.lock for these dependencies are:
FSharp.Core: 4.7
Npgsql: 4.0.9
SQLProvider: 1.1.66

I'm using .NET Core 3.0 preview9:

C:\Users\ben\proj> dotnet --info

framework: >= netstandard2.0
nuget FSharp.Core
nuget Npgsql
nuget SQLProvider

group Build

nuget FAKE

Repro steps

Please provide the steps required to reproduce the problem

  1. Create new project with forge new, which creates empty projects with paket already configured

  2. add SQLProvider, Npgsql, and FSharp.Core to paket.dependencies

  3. paket install

  4. dotnet restore

  5. build or open in ionide-vs

Expected behavior

Type provider works, intellisense works

Actual behavior

Intellisense indicates build problems; dotnet build also indicates same top-level errrors

Known workarounds

Unsure. As best I understand it, recent SDKs (after 2.2?) supposedly don't require the .NET Core type provider workaround. (The issue dotnet/fsharp#3303 is marked obsolete)

Related information

  • Used database

  • Operating system
    Windows 10

  • .NET Runtime, CoreCLR or Mono Version: 3.0-preview9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.