[R# 6.1 Build 10.0.10219.1] UsedImplicitly attribute on Enum items ignored
VS2010 SP1, C# 4.0
We define all of our enumerations with a value that corrisponds to the default value of the underlaying result. This value is designed to not be set in code, but is occassionly used for sanity checks. In prior versions of R#, we would mark these values with an UsedImplicitly attribute ( copied from the JetBrians.Annotations into our own assemblies ) so that they would not be flagged as not used.
As of the current 6.1 EAP, this no longer works. Is there something that we should be changing ( taking in account that we have developers using different versions of R#, ranging from 5.0 to 6.1EAP ) for this to continue to work?
Please sign in to leave a comment.
Hello David,
First of all please make sure that ReSharper is configured to use your code
annotation definitions under ReSharper | Options | Code Inspection | Code
Annotations. If this doesn't help, could you please attach a small sample
solution demonstrating this problem here? Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
It turns out that I had three assemblies checked on the Code Annotations page: Yours, Machine.Specifications.Annotations, and ours. Ours was selected as the default namespace. Once I unchecked the version from Machine.Specifications the code worked correctly.
Can you explain the functionallity of the checks on this option page a little? The documentation does not really cover what they (the checkboxes) do.
Thanks,
David