Ionide-vscode-fsharp: Problem with project references on .NET Core 2.0

Created on 15 Aug 2017  路  6Comments  路  Source: ionide/ionide-vscode-fsharp

Ionide doesn't see library reference on .NET Core 2.0 solution with two projects.

Repro steps

  1. Create solution with two projects: classlib and console
mkdir netcore2-vscode
cd  .\netcore2-vscode\
dotnet new sln
dotnet new classlib -lang f# -o .\lib\
dotnet new console -lang f# -o .\app\
dotnet add .\app\app.fsproj reference .\lib\lib.fsproj
dotnet sln add .\app\app.fsproj
dotnet sln add .\lib\lib.fsproj
dotnet restore
  1. Put following code into .\app\Program.fs
open System
open lib

[<EntryPoint>]
let main argv =
    Say.hello "World"
    0 // return an integer exit code
  1. Build and check that's everything is OK
dotnet build
dotnet run --project .\app\app.fsproj
  1. Open solution in VSCode

Expected behavior

Everything is fine. No errors in VSCode.

Actual behavior

Errors in VSCode:

  • Problem reading assembly 'c:\Users\m1k3y\Documents\netcore2-vscode\lib\bin\Debug\netstandard2.0\lib.dll': Build was not evaluated, expected the results to be ready after 'Eval'.'
  • The namespace or module 'lib' is not defined.
  • The value, namespace, type or module 'Say' is not defined.

vscode-screenshot

Sorry for translated version of VSCode.

Related information

  • Operating system: Windows 8.1
  • .NET Core 2.0
  • Visual Studio Code 1.15.0, Ionide 2.32.2

Please find attached repro: netcore2-vscode.zip

Thanks!

bug language services

Most helpful comment

I'm getting this issue on netcoreapp2.1 had to downgrade to netcoreapp2.0.

All 6 comments

CC: @enricosada

Issue is netstandard2.0 intellisense doesnt work atm, netcoreapp2.0 works.

We need to upgrade FSC used by FSAC. ref https://github.com/fsharp/FsAutoComplete/issues/180

Closing this one since it's tracked on FSAC repo.

OK, thanks a lot!

I'm getting this issue on netcoreapp2.1 had to downgrade to netcoreapp2.0.

I had this issue just now after changing one project from netstandard to netcoreapp.

Doing a git clean -xdf and a full rebuild seems to have sorted it.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cloudRoutine picture cloudRoutine  路  5Comments

isaacabraham picture isaacabraham  路  4Comments

bruno-cadorette picture bruno-cadorette  路  4Comments

cartermp picture cartermp  路  4Comments

landy picture landy  路  5Comments