Open lonix1 opened 2 years ago
@allisonchou: Let's test this with the latest VS Code bits to see if it still repros there.
It happened to me in Visual Studio 17.4 just today (not VS Code). In my case closing VS, deleting obj and bin directories and opening VS again, worked.
For me, the rm -rf ./bin ./obj
trick works sometimes, but even so, only for a few builds after which the problem returns. And I need to close and open vscode too.
It happens to me too, it is NOT USABLE AT ALL.
This is a very much urgent issue in my opinion. I simply can not keep coding like this.
Check this screen recording, it starts to blink on and off.
@phil-allen-msft I'm moving this back to triage since users are reporting this repros in both VS and VS Code. The last comment I believe is another instance of the colorization issues we've been seeing recently.
@phil-allen-msft what was the rationale behind making this a compiler issue? Is there some more info somewhere about what’s causing it?
Oh, I see this is about the suppression itself not working. Ok makes sense that that would be us.
I still have the same issue on .NET 8 using C# and Blazor. Suppressing the RZ10012 warning still doesn't work via .editorconfig or the
Stumbled upon this as well while tackling some other issue over at https://github.com/dotnet/razor/issues/6641#issuecomment-2447606522
(Note that I did the override in .editorconfig
on global (all files), as well as on *.cs
and *.razor
files (and combinations).
[*]
indent_style = space
dotnet_diagnostic.CS8618.severity = error
[*.razor]
dotnet_diagnostic.CS8618.severity = error
[*.cs]
dotnet_diagnostic.CS8618.severity = error
Override works for *.cs
public class Class1
{
public string Foo { get; set; }
}
✔️ VS:
✔️ VSCode:
But not for *.razor
, at least in VSCode...
✔️ VS:
❌ VSCode (still):
So generally speaking, *.razor
-files do not respect severity overrides from an .editorconfig
-file (even regardless, if the .editorconfig
specifies root = true
.
edits: more details
I think that .editorconfig
not working when tweaking CS*
diagnostics, when they're defined for *.cs
files, for code in *.razor
files is a Roslyn issue, but I could be wrong.
putting the override in a .globalconfig
indeed let's VSCode honor the modified severity. I guess this is due to the fact that .editorconfig
-settings only applies to non-generated code beneath the current project-path (and C# wihtihn *.razor
is treated as generated code? since ) , whereas .globalconfig
applies to all artifacts (let it be generated or non-generated content).
This might be due to the original confusion about .editorconfig
vs .globalconfig
and somehow is treated differntly accross VS and VSCode. But at least there would be a workaround to adress OPs problem (at least on .net 8).
In my blazor project, I get hundreds of
RZ10012
warnings:This seems to be a bug, going back for years. It's been reported dozens of times on SO and in various GitHub repos. There are no fixes or workarounds that work consistently.
It's impossible to be productive when the entire editor shows squigglies. Since the app itself works, I want to suppress that analyser rule.
So I added this to an
.editorconfig
in the project's root:That doesn't help. I also tried a
.globalconfig
file.How can I suppress it?
(I'm using .net6 and vscode)