dotnet --info output:
SDK de .NET Core (reflejando cualquier global.json):
Version: 3.0.103
Commit: b7ef045669
Entorno de tiempo de ejecuci贸n:
OS Name: arcolinux
OS Version: v20.1.4
OS Platform: Linux
RID: linux-x64
Base Path: /home/dennisqc/.dotnet/sdk/3.0.103/
Host (useful for support):
Version: 3.0.3
Commit: c03f2fe626
.NET Core SDKs installed:
3.0.103 [/home/dennisqc/.dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.3 [/home/dennisqc/.dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.3 [/home/dennisqc/.dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
VS Code version:
Version: 1.44.2
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T17:50:03.709Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.5.11-arch1-1
C# Extension version:
1.21.18

Omnisharp shows less problems or the real ones.. not every line.
Omnisharp shows ~1k problems unexpectly.
Seems related to implicit restore when opening. If you run dotnet restore from the command line and open this, do you no longer see the errors?
Seems related to implicit restore when opening. If you run
dotnet restorefrom the command line and open this, do you no longer see the errors?
Same behaviour.. it restores ok, but when i open vscode, it shows 445 problems..
@dcruz1990 Can you share the Omnisharp Log from the Output pane once all these errors appear?
@JoeRobich Maybe issue template should be updated to ask for o# log, same as "dotnet info"
@sirintruder Thanks for the suggestion! The template has been updated.
Here is the Omnisharp output log:
Starting OmniSharp server at 18/5/2020 07:51:15
Target: /home/dennisqc/WebApps/Gitee/example_blog/coding.API.slnOmniSharp server started with Mono 6.4.0.
Path: /home/dennisqc/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/OmniSharp.exe
PID: 4943[info]: OmniSharp.Stdio.Host
Starting OmniSharp on arcolinux 0.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 16.4 - "/usr/lib/mono/msbuild/Current/bin"
2: StandAlone 16.4 - "/home/dennisqc/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 16.4 - "/usr/lib/mono/msbuild/Current/bin"
CscToolExe = csc.exe
CscToolPath = /home/dennisqc/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin/Roslyn
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/home/dennisqc/WebApps/Gitee/example_blog'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/home/dennisqc/WebApps/Gitee/example_blog/coding.API.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/dennisqc/WebApps/Gitee/example_blog/coding.API.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/home/dennisqc/WebApps/Gitee/example_blog'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/dennisqc/WebApps/Gitee/example_blog/coding.API.csproj
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/home/dennisqc/WebApps/Gitee/example_blog' on host 4519.
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/home/dennisqc/WebApps/Gitee/example_blog/coding.API.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/home/dennisqc/WebApps/Gitee/example_blog/coding.API.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: coding.API
I have the same issue with the same situation as @dcruz1990. I'm on Manjaro (Arch variant), and everything worked fine when I only had .NET Core SDKs installed; as soon as I installed Mono (for dotnetfx), OmniSharp started picking the Mono MSBuild instead and showing weird random errors (like new Random() doesn't compile even when I have using System). Here's my OmniSharp log (below).
Is there a way to configure VSCode to prefer the .vscode-directory MSBuild instead of Mono?
Starting OmniSharp server at 2020-05-18, 10:11:18 a.m.
Target: /home/nightblade/code/oneons/source/Oneons.sln
OmniSharp server started with Mono 6.4.0.
Path: /home/nightblade/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/OmniSharp.exe
PID: 273961
[info]: OmniSharp.Stdio.Host
Starting OmniSharp on manjaro 0.0 (x64)
[info]: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 2 MSBuild instance(s)
1: Mono 16.4 - "/usr/lib/mono/msbuild/Current/bin"
2: StandAlone 16.4 - "/home/nightblade/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin"
[info]: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Mono 16.4 - "/usr/lib/mono/msbuild/Current/bin"
CscToolExe = csc.exe
CscToolPath = /home/nightblade/.vscode/extensions/ms-dotnettools.csharp-1.21.18/.omnisharp/1.35.1/omnisharp/.msbuild/Current/Bin/Roslyn
[info]: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/home/nightblade/code/oneons/source'.
[info]: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
[info]: OmniSharp.MSBuild.ProjectSystem
Detecting projects in '/home/nightblade/code/oneons/source/Oneons.sln'.
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/nightblade/code/oneons/source/Oneons/Oneons.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/nightblade/code/oneons/source/Puffin/Puffin.Core/Puffin.Core.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/nightblade/code/oneons/source/Puffin/Puffin.Infrastructure.MonoGame/Puffin.Infrastructure.MonoGame.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/nightblade/code/oneons/source/Puffin/Puffin.UI/Puffin.UI.csproj'
[info]: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/home/nightblade/code/oneons/source'.
[info]: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/nightblade/code/oneons/source/Oneons/Oneons.csproj
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
[info]: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140
[info]: OmniSharp.WorkspaceInitializer
Configuration finished.
[info]: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/home/nightblade/code/oneons/source' on host 273857.
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/home/nightblade/code/oneons/source/Oneons/Oneons.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/home/nightblade/code/oneons/source/Oneons/Oneons.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/nightblade/code/oneons/source/Puffin/Puffin.Core/Puffin.Core.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/home/nightblade/code/oneons/source/Puffin/Puffin.Core/Puffin.Core.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/home/nightblade/code/oneons/source/Puffin/Puffin.Core/Puffin.Core.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/nightblade/code/oneons/source/Puffin/Puffin.Infrastructure.MonoGame/Puffin.Infrastructure.MonoGame.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/home/nightblade/code/oneons/source/Puffin/Puffin.Infrastructure.MonoGame/Puffin.Infrastructure.MonoGame.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/home/nightblade/code/oneons/source/Puffin/Puffin.Infrastructure.MonoGame/Puffin.Infrastructure.MonoGame.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Loading project: /home/nightblade/code/oneons/source/Puffin/Puffin.UI/Puffin.UI.csproj
[info]: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/home/nightblade/code/oneons/source/Puffin/Puffin.UI/Puffin.UI.csproj'.
[info]: OmniSharp.MSBuild.ProjectManager
Adding project '/home/nightblade/code/oneons/source/Puffin/Puffin.UI/Puffin.UI.csproj'
[info]: OmniSharp.MSBuild.ProjectManager
Update project: Oneons
[info]: OmniSharp.MSBuild.ProjectManager
Update project: Puffin.Core
[info]: OmniSharp.MSBuild.ProjectManager
Update project: Puffin.Infrastructure.MonoGame
[info]: OmniSharp.MSBuild.ProjectManager
Update project: Puffin.UI
@nightblade9 Sorry you are having issues. This might be a case where the msbuild in the mono package isn't complete. There is a msbuild-stable package you could install that may resolve this issue. If you find things just work better with the included mono, you can also set omnisharp.useGlobalMono to never and it will only use the included mono.
@JoeRobich that seems to solve my problem actually, thank you for the work-around! Installing msbuild-stable required uninstalling mono-msbuild, but I actually didn't need mono-msbuild (for docfx - just thought I needed it).
Thanks!
So, what i need to do? install msbuild-stable ? im using dotnet for webapi.
Edit:
According to @JoeRobich , i changed the setting and everything works fine!!!
Thanks all!!!!!!!! now closing the issue.
Most helpful comment
@nightblade9 Sorry you are having issues. This might be a case where the msbuild in the mono package isn't complete. There is a msbuild-stable package you could install that may resolve this issue. If you find things just work better with the included mono, you can also set
omnisharp.useGlobalMonotoneverand it will only use the included mono.