Thứ Ba, 15 tháng 7, 2014

How to suppress a rule on FxCop

Please follow the steps below to suppress:
  1. Right click on Project -> Properties -> Build -> input CODE_ANALYSIS into Conditional compilation symbol
  2. Add new GlobalSuppressions.cs file to Properties folder on your project.
  3. Using Microsoft FxCop tool to get quickly correct a SuppressMessage:
  • Start Menu -> All Programs -> "Microsoft FxCop" option and then click on FxCop

  • Go to Project Menu and click on “Add Targets…”. Select the EXE or DLL. Once it is done, click on Analyze button and your screen will look like below:

  • Right click on any message you want to suppress and go to Copy As ->Suppress-Message or Copy As ->Module-level Suppress Message.
  • Finally paste a suppress message into GlobalSuppression.cs.

Không có nhận xét nào:

Đăng nhận xét