Skip to content

Project fails to find FSharp.Core anytime I try to compile with a reference to FSharp.Data #1220

@Disco-Dave

Description

@Disco-Dave

I'm not sure if this the correct place to ask, because I don't think this is caused by FSharp.Data, however I was hoping somewhere here could help me out.

System Information

  • 4.18.14-arch1-1-ARCH x86_64 GNU/Linux
  • dotnet 2.1.403

Reproduction steps

  1. dotnet new console -lang F# -n TryToCompileWithFsharpData && cd TryToCompileWithFsharpData
  2. dotnet build -> This works
  3. dotnet add package FSharp.Data
  4. dotnet build then I get the following errors
Microsoft (R) Build Engine version 15.8.169.62826 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restoring packages for /home/disco/Documents/code/TryToCompileWithFsharpData/TryToCompileWithFsharpData.fsproj...
  Restore completed in 152.1 ms for /home/disco/Documents/code/TryToCompileWithFsharpData/TryToCompileWithFsharpData.fsproj.
error FS3031 : The type provider '/home/disco/.nuget/packages/fsharp.data/3.0.0/lib/netstandard2.0/FSharp.Data.dll' reported an error : Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FSharp.Data.DesignTime' which cannot be loaded or doesn't exist. Could not load file or assembly 'FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/home/disco/Documents/code/TryToCompileWithFsharpData/TryToCompileWithFsharpData.fsproj]
FSC : warning FS3005: Referenced assembly '/home/disco/.nuget/packages/fsharp.data/3.0.0/lib/netstandard2.0/FSharp.Data.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [/home/disco/Documents/code/TryToCompileWithFsharpData/TryToCompileWithFsharpData.fsproj]

Build FAILED.

FSC : warning FS3005: Referenced assembly '/home/disco/.nuget/packages/fsharp.data/3.0.0/lib/netstandard2.0/FSharp.Data.dll' has assembly level attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' but no public type provider classes were found [/home/disco/Documents/code/TryToCompileWithFsharpData/TryToCompileWithFsharpData.fsproj]
error FS3031 : The type provider '/home/disco/.nuget/packages/fsharp.data/3.0.0/lib/netstandard2.0/FSharp.Data.dll' reported an error : Assembly attribute 'TypeProviderAssemblyAttribute' refers to a designer assembly 'FSharp.Data.DesignTime' which cannot be loaded or doesn't exist. Could not load file or assembly 'FSharp.Core, Version=4.4.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [/home/disco/Documents/code/TryToCompileWithFsharpData/TryToCompileWithFsharpData.fsproj]
    1 Warning(s)
    1 Error(s)

The .fsproj file


  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.1</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="Program.fs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="FSharp.Data" Version="3.0.0" />
  </ItemGroup>

</Project>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions