Open AnthonyMastrean opened 5 years ago
For what's it's worth, warnings that are upgraded to errors are also not displayed.
Example.csproj
<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
CS0169 is a build diagnostic, you need to run a build ctrl+shift+b
for it to show up, it cannot be shown otherwise (same in Visual Studio).
If you'd like to get the diagnostics around unused members from intellisense immediately upon typing, without building, that's IDE0051 diagnostic from roslyn analyzers.
For it to work you need to enable "omnisharp.enableRoslynAnalyzers": true
setting.
I don't see any Problems picked up when running the default build task (this was created automatically by Code).
{
"label": "build",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/Example/Example.csproj"
],
"problemMatcher": "$tsc"
},
The "Enable Roslyn Analyzers" option is working pretty nicely. Although, it's marking all Problems as "info" and I'd love to crank that up to "error" 😁
I don't see any Problems picked up when running the default build task (this was created automatically by Code).
@AnthonyMastrean Not sure if this is still actual for you, but it seems to be the problemMatcher
field value is wrong here - I think it should be $msCompile
instead of $tsc
(which, if I understand correctly, refers to the TypeScript compiler output parser).
Issue Description
Warnings are not displayed in the problems panel.
Steps to Reproduce
Add some code, to, literally, any kind of csharp project, that usually produces a warning, for example, an unused field.
The
dotnet build
command line complainsExpected Behavior
Warnings should be displayed in the problems panel.
Actual Behavior
Warnings are not displayed in the problems panel.
Logs
OmniSharp log
C# log
Environment information
VSCode version: 1.36.1 C# Extension: 1.20.0
Dotnet Information
.NET Core SDK (reflecting any global.json): Version: 2.2.105 Commit: 7cecb35b92 Runtime Environment: OS Name: Windows OS Version: 10.0.18362 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.2.105\ Host (useful for support): Version: 2.2.3 Commit: 6b8ad509b6 .NET Core SDKs installed: 2.2.100 [C:\Program Files\dotnet\sdk] 2.2.102 [C:\Program Files\dotnet\sdk] 2.2.104 [C:\Program Files\dotnet\sdk] 2.2.105 [C:\Program Files\dotnet\sdk] .NET Core runtimes installed: Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] To install additional .NET Core runtimes or SDKs: https://aka.ms/dotnet-downloadVisual Studio Code Extensions
|Extension|Author|Version| |---|---|---| |csharp|ms-vscode|1.20.0| |EditorConfig|EditorConfig|0.13.0| |powershell|ms-vscode|2019.5.0| |prettier-vscode|esbenp|1.9.0| |puppet-vscode|jpogran|0.18.1| |remote-containers|ms-vscode-remote|0.66.0| |remote-ssh|ms-vscode-remote|0.44.0| |remote-ssh-edit|ms-vscode-remote|0.44.0| |remote-ssh-explorer|ms-vscode-remote|0.44.0| |remote-wsl|ms-vscode-remote|0.38.9| |synthwave-vscode|RobbOwen|0.0.7| |theme-panda|tinkertrain|1.3.0| |vscode-docker|ms-azuretools|0.7.0| |vscode-peacock|johnpapa|2.4.0| |vscode-remote-extensionpack|ms-vscode-remote|0.15.0| |vscode-terminals|fabiospampinato|1.12.6| |vsliveshare|ms-vsliveshare|1.0.509| |vsliveshare-audio|ms-vsliveshare|0.1.59| |vsliveshare-pack|ms-vsliveshare|0.3.2| |xml|DotJoshJohnson|2.5.0|;