ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
856 stars 277 forks source link

Missing reference when loading a net5.0 project #1618

Closed MangelMaxime closed 2 years ago

MangelMaxime commented 2 years ago

Describe the bug

Loading a project setup for net5.0 framework report an error about missing references.

You must add a reference to assembly 'netstandard'.

Steps to reproduce

  1. Create a new F# project dotnet new classlib -lang f#
  2. Configure the TargetFramework to be <TargetFramework>net5.0</TargetFramework>
  3. See that Ionide reports an error

image

Textual code:

Library.fs

namespace testIonide

module Say =
    let hello name =
        printfn "Hello %s" name

MyProject.fsproj

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
  </PropertyGroup>

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

</Project>

If you change TargetFramework to net6.0 or netstandard2.0 it works.

Expected behaviour

Ionide should not report an error

Machine info

open-collective-bot[bot] commented 2 years ago

Hey @MangelMaxime :wave:,

Thanks for backing our project. If possible, We will handle your issue with priority support. To make sure we don't forget how special you are, we added a backer label to your issue.

Thanks again for backing us :tada:!

Krzysztof-Cieslak commented 2 years ago

I can't reproduce this one.