Reputation: 17379
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.
Upvotes: 5
Views: 955
Reputation: 17379
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.
Upvotes: 1