C
C#2y ago
Taylor

✅ Suppressions aren't working in vs studio. What do I do?

I keep trying to select "suppress for all" and it does not at all save and make any changes. I've clicked this like 70 times now bc I keep WANTING it to work, but obviously it doesn't work. This is frustrating the hell out of me.
9 Replies
Angius
Angius2y ago
Did you think of perhaps fixing the issue instead? That guarantees the warning goes away
Taylor
TaylorOP2y ago
Yeah, I'm considering it. Trying to wrap my head around why C#8 thinks this is a good idea. Seems dumb as f*** unless there is some optimization reason behind it. It requires adjusting my way of thinking on pass-by-reference types.
Ainz
Ainz2y ago
I think you should try and fix the issue to handle null, but just to answer the question, when I click Preview Changes and Click apply, it is creating an .editorconfig file on my PC. Is it not doing that for you?
Angius
Angius2y ago
It makes nullability (almost) the same for value types and reference types, that's the reason behind that change Actually forces you to guard against nulls, so you don't get NullReferenceExceptions as often
Ainz
Ainz2y ago
iirc, it's mostly or all static compiler analysis
Angius
Angius2y ago
Yeah The "hurr durr no BC breaks ever or the world will collapse" really made the nullability changes toothless
Anton
Anton2y ago
disable nullability for the whole project it's not dumb, it's you providing more info to the compiler
Taylor
TaylorOP2y ago
I figured it out. Had to delete my .editorconfig file then retry the supression. It recreated the file and added it to the project and now it works.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server