TeamCity FxCop Choosing the Minimum RecommendedRules.ruleset Does Not Affect

I added a build step in TeamCity 8.0.6 (build 27767) to execute FxCop for a specific build of a C # project.

When I run FxCop with VS 2013 with MinimumRecommendedRules installed, I do not receive any errors or warnings (I fixed them).

Now I want to associate this with TeamCity. To limit the rules, I specify a command line property as follows:

/ruleSet:=MinimumRecommendedRules.ruleset  /rulesetdirectory:'FxCop\Rule Sets'

(The rulesetdirectory parameter points to a location in my source tree that contains the full contents of the standard Rule Sets folder)

However, this does not have the desired behavior, the FULL rule set is run, and I get the error as follows:

FxCop Warning: Keyword = CA0063 View = Engine Type = Microsoft.FxCop.Sdk.FxCopException * Failed to load rule set file "MinimumRecommendedRules.ruleset" or one of its dependent rule set files.

And this is the TeamCity command line:

[17:32:29] Start: "C: \ Program Files (x86) \ Microsoft Visual Studio 10.0 \ Team Tools \ Static Analysis Tools \ FxCop \ FxCopCmd.exe" / forceoutput / ignoregeneratedcode / ruleSet: = MinimumRecommendedRules. ruleset "/ rulesetdirectory: 'FxCop \ Rule Sets'" /f:dal\bin\release\MyDAL.dll/out:C:\TeamCity || buildAgent \ temp \ buildTmp \ fxcop-output-1891867450083417003 \ fxcop-result.xml

Can anyone determine what is wrong?

+4
source share
1

, , - .

the/ruleSet: ( ) :

/ruleSet:"=%teamcity.build.workingDir%\FxCop\RuleSets\MinimumRecommendedRules.ruleset"

(: , teamcity.build.workingDir )

-, /rulesetdirectory: . , .

, MinimumRecommendedRules.ruleset . Rule Sets "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\ \ ".

, , - VS 2013, TeamCity v10, "root " "c:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Static Analysis Tools\FxCop", , FxCop .Net 4.5. (: VS 2013, - ++, , , FxCop. FxCop VS 2013)

+6

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


All Articles