Entire top-level program file is always faded with IDE0051 "Private member '$Program.$Main' is unused." #45496
Labels
Area-IDE
New Language Feature - Simple Programs
Top-level statements
Resolution-Fixed
The bug has been fixed and/or the requested behavior has been implemented
Milestone
Version Used: 16.7-p3.1
The program runs fine. There's just an errant IDE0051 in the error list and fading the entire file:
If you trigger the lightbulb or click 'Show potential fixes,' you get a gold bar saying CSharpRemoveUnusedMembersCodeFixProvider crashed:
Repro
It repros with
net5.0
also, and it doesn't change anything when Program.cs is complex.dotnet --info
The text was updated successfully, but these errors were encountered: