version 1.25.0 "omnisharp.useGlobalMono" Disappeared
See original GitHub issueEnvironment 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
-
“omnisharp.useGlobalMono”: “always” in vscode settings.json at version 1.25.0 turns to grey, and no setting in setting view.
-
however, when i reduce version to 1.24.4, “omnisharp.useGlobalMono”: “always” highlight in settings.json, and there are no more mistakes
Issue Analytics
- State:
- Created a year ago
- Comments:18 (5 by maintainers)
Top Results From Across the Web
c# - MacOS/VisualStudioCode/Omnisharp missing .NET ...
The issue seems to have stemmed from Omnisharp's decision to include mono internally. They default to that version of the compiler, ...
Read more >PSA: If your VS Code C# extension stopped working... | Page 3
Then, on VSCode, go to settings-> "Omnisharp: Use global Mono" -> change it ... a new C# VS Code extension was released, the...
Read more >“Omnisharp: Use Global Mono” - Talk - GameDev.tv Community
In VSC C# plugin version 1.25. 0, “Omnisharp: Use Global Mono”. no longer exists. To get omnisharp working (in my case), do these...
Read more >C# - Visual Studio Marketplace
C# for Visual Studio Code (powered by OmniSharp). Welcome to the C# extension for Visual Studio Code! This extension provides the following ...
Read more >Lukman Al (@eggbitramen) / Twitter
If you're trying to get Unity to work with vscode on a Linux/Mac, Microsoft no longer supports Mono, and Omnisharp versions 1.25.0 does...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m having a similar problem and log. It started two days ago out of the blue.Edit: Search
omnisharp.useModernNet
in your VS code settings and uncheck the box.Omnisharp recently released a breaking change that flips the default state of this boolean. See the announcement here.
Since OmniSharp no longer ships with an included Mono or MSBuild tools there is no need for the “useGlobalMono” setting and it was removed. See the announcement at https://github.com/OmniSharp/omnisharp-vscode/issues/5120