_If this is not an ionide-vscode-fsharp issue, just let me know. I'd be happy to post it to the right place._
The VS Code editor is showing me the following error when I open an F# source code. And Intellisense for the referenced library stops working.
Problem reading assembly 'Library1\bin\Debug\netstandard2.0\Library1.dll':
The project has no results due to critical errors in the project options.
Check the HasCriticalErrors before accessing the detailed results.
Errors: No inputs specified
Assembly reference 'mscorlib.dll' was not found or is invalid
Repro steps
Library1.Say.hello name to the end of the Library.fs file.Expected
VS Code editor to display F# source code files _without_ error. Intellisense to work properly.
Actual
VS Code editor shows the following error when viewing Library2\Library.fs. Intellisense stops working.
Problem reading assembly 'Library1\bin\Debug\netstandard2.0\Library1.dll':
The project has no results due to critical errors in the project options.
Check the HasCriticalErrors before accessing the detailed results.
Errors: No inputs specified
Assembly reference 'mscorlib.dll' was not found or is invalid

My Environment
Windows 7 x64
dotnet 2.1.101
Microsoft (R) F# Compiler version 4.1
Microsoft (R) Build Engine version 15.6.82.30579 for .NET Core
VS Code
Version 1.21.0
Commit 9a199d77c82fcb82f39c68bb33c614af01c111ba
Date 2018-03-07T11:04:09.969Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
Ionide-fsharp
3.17.3 - 08.03.2018
I believe I solved this by making my FSHARPINSTALLDIR and PATH environment variables to both point to the same F# SDK folder.
I'm assuming that when I recently ran the Visual Studio Installer, and updated the Visual Studio Build Tools 2017 to Version 15.6, they became inconsistent.
When I had this...
FSHARPINSTALLDIR=C:\Program Files (x86)\Microsoft SDKs\F#\10.1\Framework\v4.0\
PATH = ... C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\ ...
... I was getting the errors in VS Code. Notice that one points to 10.1; the other points to 4.1. After changing my PATH to point to the 10.1 folder, the errors do not appear in VS Code.
I now see there is also a VS Code setting for "FSharp.toolsDirPath".
We can tell users to check their environment variables and settings, pointing them at the same F# SDK.
Yes, MSFT has ~broken stuff again~ changed typical installation paths in latest VS update, which means that if you had some Environment Variables set previously they may be incorrect at the moment.
I'm not sure what can be done about it other than detecting this particular error (which may or may not happen only for such problem) and show message box with suggested solution.
I get this also on find usages. Its only on one particular solution at work - find usages works on other solutions. I get this in ionide log
[Extension Host] [IONIDE-FSAC] RES (108) <- {symboluseproject} in 185 ms: Kind={"info"}
Data=Request cancelled (exn was System.InvalidOperationException: The project has no results due to critical errors in the project options. Check the HasCriticalErrors before accessing the detailed results. Errors: Unable to find the file 'mscorlib.dll' in any of
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2
c:\Sandbox\singapore\Singapore.Host
C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp.NETFramework\v4.0\4.4.1.0
Unable to find the file 'mscorlib.dll' in any of
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2
c:\Sandbox\singapore\Singapore.Host
C:\Program Files (x86)\Reference Assemblies\Microsoft\FSharp.NETFramework\v4.0\4.4.1.0
at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpCheckProjectResults.getDetails()
at Microsoft.FSharp.Compiler.SourceCodeServices.FSharpCheckProjectResults.GetUsesOfSymbol(FSharpSymbol symbol)
at Microsoft.FSharp.Control.AsyncBuilderImpl.[email protected](a a))
FSHARPINSTALLDIR and PATH both point to
C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\
and I also tried setting this on workspace settings
"FSharp.toolsDirPath": "C:\Program Files (x86)\Microsoft SDKs\F#\4.1\Framework\v4.0\"
I can show you when I'm over at F# Exchange this week :-)
is there a solution to this.
I have path, fsharpinstalldir and the toolsdirpath all set to "C:\Program Files (x86)\Microsoft SDKs\F#10.1\Framework\v4.0\" but get the mscorelib error
I'm having the same issue on Ubuntu 18.04. If a project references another one the project with reference gets Assembly reference 'mscorlib.dll' was not found or is invalid.
I've tried to set FSHARPINSTALLDIR, PATH and FSharp.toolsDirPath with no success.
I also have the same issue on Ubuntu 18.04. I have dotnet core sdk 2.1 installed as well as mono. The error shows on VS Code but it still runs correctly on dotnet run. However, that same error above shows
I found strange workaround that may help resolve this issue. Invalid reference message only appears if the referenced project has <DebugType>portable</DebugType> in its fsproj.
If I remove DebugType from all projects in the solution --> error message disappears...
I have the same issue (Mac OS 10.14), and it is really strange. I have a solution with 3 projects (let's call them A, B and C). Both A and B reference C in the exact same way (the .fsproj files are identical, except for their name). In project A intellisense works, but in project B it doesn't. It's really upsetting.
Same issue in macOS
@AbrahamAlcaina I see this issue from time to time and not only with Ionide.
In general, I clean all the cache/temporary files in my project using git clean-dxf and then rebuild the project and restart Ionide.
I haven't seen this in a while. And known workaround to any such problems in .Net is cleaning obj folder.
Closing.
Most helpful comment
I also have the same issue on Ubuntu 18.04. I have dotnet core sdk 2.1 installed as well as mono. The error shows on VS Code but it still runs correctly on
dotnet run. However, that same error above shows