Open Disco-Dave opened 5 years ago
See also dotnet/netcorecli-fsc#123
It looks like the issue appears on Arch Linux only, therefore I opened a bug report there.
I was working on a project and started encountering this issue. I'm using Arch Linux with the dotnet-sdk
repo package and fsharp
AUR package.
It turns out that the dotnet-sdk
package is pretty out of date, and it uses SDK 2.2.105.
I updated the SDK by going to https://dotnet.microsoft.com/download/dotnet-core/2.2 and installing the latest version (2.2.300 at the time of this post). To install, I copied the tar file to /opt/dotnet (default location for the repo package), then extracted the whole file in place. This added the necessary folders to sdk
, host
, and shared
, from what I can tell.
I tried building again using dotnet build
at my project's root and everything worked, whereas before I was getting the same error you described.
So it seems the actual solution is to manually update your sdk version using the steps above, since the issue has been fixed, but no updates were pushed for Arch Linux. Perhaps someone could make an AUR package to do those steps automatically?
This did solve the problem for me as well.
Thanks!
I have the same problem on Windows using .NET 4.8 (which I cannot simply convert). What can I do?
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
Reproduction steps
dotnet new console -lang F# -n TryToCompileWithFsharpData && cd TryToCompileWithFsharpData
dotnet build
-> This worksdotnet add package FSharp.Data
dotnet build
then I get the following errorsBuild 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)