CS0612 propagating obsolete methods
See original GitHub issuedotnet-format
’s fix for CS0612 is propagating the Obsolete
attributes, making all my methods that uses an Obsolete
method also Obsolete
. I wasn’t able to find any documentation on fixes for CS0612 and what would be the expected behavior in this situation.
Is this expected? If so, where can I find info on this fix?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to resolve build warning for obsolete methods ...
Description: While working with the projects, sometimes we have some deprecated methods called in our code and when we build.
Read more >Compiler Warning (level 1) CS0612
The class designer marked a member with the Obsolete attribute. This means that the member might not be supported in a future version...
Read more >CS0612 warning about obsolete member not suppressed ...
CS0612 warning about obsolete member not suppressed when it is referenced by a ObsoleteAttribute placed on a method #23015.
Read more >Why does Visual Studio not consider Obsolete("message") ...
When the ObsoleteAttribute is being applied without a message, it results in a CS0612 warning, which is level 1 .
Read more >Code Inspections in C# | ReSharper Documentation
This category groups code inspections with minor severity levels. Inspection. ID · EditorConfig property · Default severity · Method invocation ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think there needs to be some way to control the behavior of the formatter for this.
In my case I definitely want the warnings produced by CS0618, but marking members of my code that use
Obsolete
code as alsoObsolete
is incorrect (it’s not obsolete, but does need need updating to use non-obsolete code, hence why I still need CS0618 enabled).exclude-diagnostics
option was enough for medotnet format --exclude-diagnostics CS0612 CS0618