Is there a simple fix for the following? Or is this a bug in VSCode and/or the language-specific extensions?
I created two projects and a solution like this:
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 project reference to the ClassLibrary from within the MainProgram.
dotnet add reference ..\ClassLibrary\ClassLibrary.fsproj
I updated the Program.cs to call the 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 when I open the solution folder in Visual Studio Code.
I have also tried opening the project folders separately.
Update
I have VS Code version 1.15.1, with five extensions installed.
Looks like we just need to wait for this fix.
And, if you have Visual Studio Build Tools 2017 installed, update to the latest version and F# compiler workload.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With