I am using VSCode-Insiders and OmniSharp C# intellisense does not see F# types/modules/namespaces. Here is simple project:
module T1
let t = 42
And C#:
using System;
namespace flowRunner
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(T1.t);
}
}
}
Build through command line with dotnet build works fine. Also dotnet run works fine too. And debugging in VS Code works. But intellisense shows:
Question: How can I fix this? I have similar problem on bigger solution and it is very annoying when you have 1K errors all around which are not errors.
Also, what I noticed that this happened starting from some timepoint (assuming with some new version of IDE and/or Extension etc).
Omnisharp log (a part of it, but there is no errors or warns):
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Visual Studio Build Tools 2017 15.9.28307.812 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
2: StandAlone 16.0 - "C:\Users\dvitel\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.2\.msbuild\Current\Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to 'C:\Users\dvitel\.vscode-insiders\extensions\ms-vscode.csharp-1.21.1\.omnisharp\1.34.2\.msbuild\Current\Bin\MSBuild.exe'
Also, I did not found any entry in logs dropdown for Ionide (I am pretty sure it existed some time before).
Projects are configured to have TargetFramework net45. But I tried also netcoreapp2.2 - it did not work.
Configuration. VS Code - Insiders:
Version: 1.38.0-insider (user setup)
Commit: 185308c0dd317d73fe4c19dea347582dee9650de
Date: 2019-08-26T09:46:11.283Z
Electron: 4.2.9
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.18362
Extensions (and their versions):
.NET Core SDK:
PS C:\Users\dvitel\Documents\Visual Studio 2019\SO> dotnet --info
Version: 2.2.6
Commit: 7dac9b1b51
.NET Core SDKs installed:
2.0.0 [C:\Program Files\dotnet\sdk]
2.1.200 [C:\Program Files\dotnet\sdk]
2.2.401 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]