Visual Studio Code Validation

I once remember seeing an addon or something for VS2008. It was provided by Microsoft and was part of the best practices. Basically, every time a project is built, it checks your code to make sure that all properties have comments, etc.

Please help me remember what it's called?

+3
source share
3 answers

FxCop ( new page ) and StyleCop

FxCop . Provides static precast analysis.
StyleCop . Provides source code analysis.

Both can be integrated into the visual studio by editing your .csproj files, which include tasks to run the analysis.

FxCop:
Can be integrated by calling the FxCopCmd command-line tool from the post build event. Add something like this to your .csproj file. We also include a common user dictionary with our analysis. You can skip this if you do not want it.

  <PropertyGroup>
    <PostBuildEvent> "% 25ProgramFiles% 25 / Microsoft FxCop / FxCopCmd.exe" / file: "$ (TargetPath)" / searchgac / console /dictionary:"$(SolutionDir)....\Tools\FxCop\Config\CustomDictionary. xml "</PostBuildEvent>
  </PropertyGroup>
StyleCop:
This is done by importing StyleCop targets
  <Import Project = "$ (ProgramFiles) \ MSBuild \ Microsoft \ StyleCop \ v4.3 \ Microsoft.StyleCop.targets" />

(FxCop is now integrated into the VS2008 team edition, it is called "code analysis")

[Edit: FxCop home, (1.36) . , vs2010, , .]

+8

FxCop?

"FxCop - , (, Common Language.NET Framework), , ​​ , , ".

+1
+1

Source: https://habr.com/ru/post/1713067/


All Articles