vscode-csharp
vscode-csharp copied to clipboard
Could not locate .NET Core project in F# project
Issue Description
When running in directory of F# Project (*.fsproj), running ".NET: Generate Assets for Build and Debug" produces: "Could not locate .NET Core project. Assets were not generated."
Steps to Reproduce
On Linux with .NET 6.0 SDK installed, run the following command to create a F# project with a solution file.
dotnet new console -lang F# -o FSharpProject
cd FSharpProject/
dotnet new sln
dotnet sln add .
code .
In VS Code, run ".NET: Generate Assets for Build and Debug" from Command Palette.
Expected Behavior
The config for Debug generated in .vscode/tasks.json and .vscode/launch.json so that "Ionide for F#" plugin can debug the F# project.
Actual Behavior
An error message appeared: "Could not locate .NET Core project. Assets were not generated."
F# plugin relies on OmniSharp plugin's assets to debug F# apps, but it seems OmniSharp refuses to generate them in F# project directory.
Logs
OmniSharp log
OmniSharp server started with .NET 6.0.301
.
Path: /home/
Starting OmniSharp on Unknown 0.0 (Unknown)
info: OmniSharp.Services.DotNetCliService
Checking the 'DOTNET_ROOT' environment variable to find a .NET SDK
info: OmniSharp.Services.DotNetCliService
Using the 'dotnet' on the PATH.
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: .NET Core SDK 6.0.301 17.2.0 - "/usr/share/dotnet/sdk/6.0.301/"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: .NET Core SDK 6.0.301 17.2.0 - "/usr/share/dotnet/sdk/6.0.301/"
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/home/
C# log
Environment information
VSCode version: 1.69.0 C# Extension: 1.25.0 Ionide for F#: 6.0.6
Mono Information
OmniSharp using mono :6.8.0Dotnet Information
.NET SDK: Version: 6.0.301 Commit: 43f9b18481Runtime Environment: OS Name: ubuntu OS Version: 22.04 OS Platform: Linux RID: ubuntu.22.04-x64 Base Path: /usr/share/dotnet/sdk/6.0.301/
Host (useful for support): Version: 6.0.6 Commit: 7cca709db2
.NET SDKs installed: 6.0.301 [/usr/share/dotnet/sdk]
.NET runtimes installed: Microsoft.AspNetCore.App 6.0.6 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 6.0.6 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download