C
C#13h ago
Parker

How can I get format warning on the console?

I'm developing a .NET C# application for Linux and I was wondering if there's some way to get the warning I get on vscode like Remove unused parameter 'Sender'IDE0060 or Name can be simplified IDE0002 on the console? I tried with dotnet format and dotnet format analyzers but those didn't printed any of those warning and they didn't fix them either.
6 Replies
Servator
Servator13h ago
Probably it expect you to change it's name to "_" because it's unused I don't know about vsc stuff tbh Prefer VS over VSC
Parker
ParkerOP13h ago
Yeah I get that, but I'm looking for a way to see those warnings from the console :/ Same but I'm on Linux now and for some reason debugging on Rider doesn't work so I'm stuck with vscode
Servator
Servator13h ago
oh damn
lycian
lycian12h ago
https://github.com/dotnet/roslyn/issues/6195 gives some context on the history of this
GitHub
IDE rules don't fail builds · Issue #6195 · dotnet/roslyn
When using code analysis with the IDE rules under Microsoft.CodeAnalysis.CSharp.Features enabled and their action set to Error, if one of the rules is violated, I correctly get the error message, h...
lycian
lycian12h ago
MSBuild properties for Microsoft.NET.Sdk - .NET
Reference for the MSBuild properties and items that are understood by the .NET SDK.
lycian
lycian12h ago
MSBuild properties for Microsoft.NET.Sdk - .NET
Reference for the MSBuild properties and items that are understood by the .NET SDK.
Want results from more Discord servers?
Add your server