StyleCop (VS 2008/2010 plug in for style checking)

Download StyleCop

http://code.msdn.microsoft.com/sourceanalysis

 

 

Setting Up StyleCop MSBuild Integration
http://blogs.msdn.com/sourceanalysis/pages/source-analysis-msbuild-integration.aspx

 

========Extract============

 

This will cause the StyleCop binaries and supporting MSBuild targets files to be installed under the {Program Files}/MSBuild/Microsoft/StyleCop folder.

 

Adding the Import Tag

Once the StyleCop MSBuild files are installed, the next step is to import the StyleCop targets file into your C# projects. This is done by adding an Import tag to each C# project file.

For example, to integrate StyleCop to the project SampleProject, open the project file SampleProject.csproj within your favorite text editor. Scroll down to the bottom of the file and add a new tag to import the Microsoft.StyleCop.targets file. This import tag should be added just below the import of Microsoft.CSharp.targets:

<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">Save the modified .csproj file. The next time you build this project either within Visual Studio or on the command line, StyleCop will run automatically against all of the C# source files within the project.

   ...Contents Removed...

 

  <Import Project="$(MSBuildBinPath)/Microsoft.CSharp.targets" />

  <Import Project="$(ProgramFiles)/MSBuild/Microsoft/StyleCop/v4.3/Microsoft.StyleCop.targets" /> 

 

   ...Contents Removed...

 

 

</Project>

 

=========================

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值