Skip to content

version 1.25.0 "omnisharp.useGlobalMono" Disappeared #5228

@liujinlong123

Description

@liujinlong123

Environment data

dotnet --info output:

mk@mk:~$ dotnet --info
.NET SDK (反映任何 global.json):
 Version:   6.0.300
 Commit:    8473146e7d

运行时环境:
 OS Name:     ubuntu
 OS Version:  20.04
 OS Platform: Linux
 RID:         ubuntu.20.04-x64
 Base Path:   /home/mk/.dotnet/sdk/6.0.300/

Host (useful for support):
  Version: 6.0.5
  Commit:  70ae3df4a6

.NET SDKs installed:
  6.0.104 [/home/mk/.dotnet/sdk]
  6.0.202 [/home/mk/.dotnet/sdk]
  6.0.300 [/home/mk/.dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.4 [/home/mk/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.5 [/home/mk/.dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.4 [/home/mk/.dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.5 [/home/mk/.dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

VS Code version: version 1.67
C# Extension version: version 1.25.0

OmniSharp log

Starting OmniSharp server at 2022/5/25 21:24:06
    Target: /home/mk/workLiu/simulation/unity/L_Learn

OmniSharp server started with .NET 6.0.300
.
    Path: /home/mk/.vscode/extensions/ms-dotnettools.csharp-1.25.0-linux-x64/.omnisharp/1.39.0-net6.0/OmniSharp.dll
    PID: 26112

[info]: OmniSharp.Stdio.Host
        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 3 MSBuild instance(s)
            1: .NET Core SDK 6.0.300 17.2.0 - "/home/mk/.dotnet/sdk/6.0.300/"
            2: .NET Core SDK 6.0.202 17.1.1 - "/home/mk/.dotnet/sdk/6.0.202/"
            3: .NET Core SDK 6.0.104 17.0.0 - "/home/mk/.dotnet/sdk/6.0.104/"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        Registered MSBuild instance: .NET Core SDK 6.0.300 17.2.0 - "/home/mk/.dotnet/sdk/6.0.300/"
[info]: OmniSharp.WorkspaceInitializer
        Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectSystem
        Detecting projects in '/home/mk/workLiu/simulation/unity/L_Learn/L_Learn.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
        Queue project update for '/home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp-Editor.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
        Detecting CSX files in '/home/mk/workLiu/simulation/unity/L_Learn'.
[info]: OmniSharp.Script.ScriptProjectSystem
        Did not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
        Configuration finished.
[info]: OmniSharp.Stdio.Host
        Omnisharp server running using Stdio at location '/home/mk/workLiu/simulation/unity/L_Learn' on host 25934.
[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp.csproj'.
/home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp.csproj
/home/mk/.dotnet/sdk/6.0.300/Microsoft.Common.CurrentVersion.targets(1221,5): Error: This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp-Editor.csproj
[fail]: OmniSharp.MSBuild.ProjectLoader
        This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).
[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp-Editor.csproj'.
/home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp-Editor.csproj
/home/mk/.dotnet/sdk/6.0.300/Microsoft.Common.CurrentVersion.targets(1221,5): Error: This project targets .NET version that requires reference assemblies that are not installed (e.g. .NET Framework). The most common solution is to make sure Mono is fully updated on your machine (https://mono-project.com/download/) and that you are running the .NET Framework build of OmniSharp (e.g. 'omnisharp.useModernNet': false in C# Extension for VS Code).

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp.csproj
[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /home/mk/workLiu/simulation/unity/L_Learn/Assembly-CSharp-Editor.csproj
[warn]: OmniSharp.Roslyn.CSharp.Services.InlayHints.InlayHintService
        Inlay hints requested for document not in workspace Location { FileName = /home/mk/workLiu/simulation/unity/L_Learn/Assets/Scripts/ExperimentB/RelationFeedbackGroupController.cs, Range = Range { Start = Point { Line = 0, Column = 0 }, End = Point { Line = 113, Column = 9 } } }

Steps to reproduce

when i open my unity project, then show the error.

Additional context

  1. "omnisharp.useGlobalMono": "always" in vscode settings.json at version 1.25.0 turns to grey, and no setting in setting view.

  2. however, when i reduce version to 1.24.4, "omnisharp.useGlobalMono": "always" highlight in settings.json, and there are no more mistakes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions