Please follow the steps below to suppress:
- Right click on Project -> Properties -> Build -> input CODE_ANALYSIS into Conditional compilation symbol
- Add new GlobalSuppressions.cs file to Properties folder on your project.
- 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