Is there a simple fix for the following? Or is it a bug in VSCode and / or language extensions?
I created two projects and the following:
dotnet new library -lang F# -o .\ClassLibrary
dotnet new console -lang C# -o .\MainProgram
dotnet new sln
dotnet sln add .\ClassLibrary\ClassLibrary.fsproj
dotnet sln add .\MainProgram\MainProgram.csproj
I added a link to the project in ClassLibrary from the main program.
dotnet add reference ..\ClassLibrary\ClassLibrary.fsproj
I updated Program.cs to call ClassLibrary.
static void Main(string[] args)
{
ClassLibrary.Say.hello("world.");
}
I can restore, build and run the program successfully.
dotnet restore
dotnet run -p .\MainProgram\MainProgram.csproj
The problem is that I open the solution folder in Visual Studio code.
- When I open Program.cs, the red editor emphasizes that there are no F # library types.
- When I open Library.fs, the red-editor emphasizes almost everything. Interestingly, the errors are from the C # compiler, not from the F # compiler.
- Ctrl-Shift-B creates projects with 0 warnings and 0 errors.
- VSCode Windows 12 .


.
- VS- F #, Intellisense .
- VS- #, - F #.
VS 1.15.1 .
- #, 1.12.1
- Ionide-fsharp, 2.33.0
- PL/SQL, 1.0.4
- Mono Debug, 0.15.7
- XML Tools, 1.9.2