Fxcop and Visual Studio X Integration

Source: Internet
Author: User

Similar to stylecop, fxcop and stylecop are used to constrain our encoding specifications. For the differences between them and the code analysis provided by Vs, refer to the blog post on debuglzq.

The installation process is very simple. You can download the installation files of the two policemen from the Internet and install them according to the default settings.

After stylecop is installed, you can right-click and use it in the VS solution or any location of a single file. It has been integrated into vs by default. As shown in.

After fxcop is installed, it is not inherited to vs by default. After the installation is complete, it is as follows:

Of course, we can run this "traffic light" to create a new fxcop project, and then load the corresponding project (Compiled EXE, DLL, etc.). Analyze is as follows:

It is better to integrate fxcop into vs, which is also a problem to be explained in this blog post, because debuglzq encountered the same problem during its own settings, therefore, write it out for reference by bloggers who encounter the same problem.

On the vs interface, Click Tools> external tools and add one. As follows:

The relevant information to be filled in is shown in the above interface, the content is:

  • Title (name, any ):Run Fxcop
  • Command(path of fxcopcmd.exe ):C: \ Program Files \ microsoft fxcop 1.36 \ fxcopcmd.exe
  • Arguments (the debuglzq does not understand the meaning of each field when running some fxcop configurations./Note R: You can add custom rules to this Rules path ):/C/F: $ (targetpath)/D: $ (bindir)/R: "C: \ Program Files \ microsoft fxcop 1.36 \ rules"
  • Initial directory (initialization path, fxcop installation path ):C: \ Program Files \ microsoft fxcop 1.36

This completes the integration of fxcop and Visual Studio.

The tools toolbar has the run fxcop we just added.

Click to run as follows:

OK, so that fxcop is successfully integrated into Visual Studio. Note the setting of the arguments column.

Blog posts do not have any advanced technology. Old birds can bypass and Pat, hoping to help you ~

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.