Can't load nuget package written with .NET Core

Viewed 398

I have recently attempted to migrate my open source project GeographicLib.FSharp (https://github.com/SpiegelSoft/GeographicLib) to .NET Standard. I can build the project, package it and upload it to nuget, but when I try to load the nuget package into an external .NET Standard Library, I obtain mixed results.

Creating an F# library using dotnet new classlib -lang f# and adding the Nuget package via Visual Studio works on the face of it, but I cannot access any of the types I defined in the GeographicLib.FSharp library.

If I create a C# .NET Standard library using the Class Library (.NET Standard) template, then upgrade this package to .NET Standard 1.6, I can add the GeographicLib.FSharp nuget package and access the types as normal.

It appears that importing types from Nuget packages in F# .NET Standard Libraries is broken.

Is there a fix or a workaround for this?

1 Answers

Visual Studio F# extension doesn't yet support .NET Standard or .NET Core projects.

See https://blogs.msdn.microsoft.com/dotnet/2017/08/14/f-and-net-core-roadmap-update/ for more info and roadmap

If you think is an issue, please open a bug in Visual F# repository https://github.com/Microsoft/visualfsharp/issues

These project build, but doesnt load intellisense in Visual Studio.

Meanwhile you can use other ide/editors, like:

  • Visual Studio Code with Ionide extension
  • JetBrains Rider
  • vim
  • emacs
  • Visual Studio for Mac
Related