0

I have implemented the source, it contains some CA1800(DoNotCastUnnecessarily) warnings. I can't able to fix this warning in source, so I try to suppress the warning by adding suppress code in the method.

[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily", Justification = "Ignored this warning")]

When build the project in visual studio 2015, the warnings are not shown. But when run with fxcop tool, it generates this warning.

How can I properly ignore the warning when I build with fxcop tool in server side also?

Jagadeesan
  • 233
  • 1
  • 13

1 Answers1

0

I have analyzed the project file(.csproj) which contains the DebugType is none, so the suppressed codes are not detected. When change the DebugType to full, now the suppressed code properly working.

<DebugType>full</DebugType>
Jagadeesan
  • 233
  • 1
  • 13