CA1309 是否仍然对针对 .NET 4.5.1 编译的源代码有效?

Is CA1309 still valid for source compiled against .NET 4.5.1?

当我们为我们的一个项目启用具有 "Microsoft All Rules" 规则集的超集的 fxcop 时,它也启用了 CA1309 并立即开始抱怨这样的构造:

if (translationItem.Description == "Description")

显示如下警告:

查看 string here 的参考源时,它表明 operator == 使用 String.Equals,而 String.Equals 又使用 EqualsHelper。当调用 CA1309 提出的 Equals 重载时,同样会调用 EqualsHelper。因此,似乎 == 运算符已经使用了序数比较。

所以我的问题是,我们是否应该将上面的代码片段重构为:

if (string.Equals(translationItem.Description, "Description", StringComparison.Ordinal))

如果是这样,我们为什么要这么做?

P.S。我们确实打算在上面的代码片段中使用区分大小写的字符串比较。

P.S.2。我们使用 Microsoft.CodeAnalysis.FxCopAnalyzers nuget 包来 运行 即时代码分析。

答案不多,但根据评论中愤世嫉俗者的要求,an issue has been raised over at the roslyn github. The issue has been resolved and closed and the fix will be released with milestone 15.3