I'm using Microsoft Visual Studio Enterprise 2022 (64 bit) Version 17.3.0 and JetBrains ReSharper 2022.2 Build 222.0.20220728.74125.
Resharper shows "Method Main is never used" but I want to suppress this only if the target is entry point method.
I know I can suppress this by insert the comment to the code but it bothers me and code is polluted.
Is there any solutions?
CodePudding user response:
Maybe try to update R#. I'm using JetBrains ReSharper 2022.2.1 Build 222.0.20220808.100806 built on 2022-08-08 and it looks like this:

As you can see, UnusedMethod and args are considered unsed by R#, but not Main.
Maybe you can share a sample repo if resetting all R# caches and deleting all bin and obj folders don't help.
