Cannot get TeamCity FxCop Build Runner to work

Any ideas on how this error message goes away?

Cannot start the process E: \ Program Files \ Microsoft FxCop 1.36 \ FxCop.exe \ FxCopCmd.exe / forceoutput / gac / ignoregeneratedcode / f: \ Sacog \ bin \ Debug \ Sacog.dll / out: 05A1B22A-DE6E-49ae -AA30 -DC52A074EF22 \ fxcop-result.xml: file not found

+3
source share
4 answers

I needed to install the following in the buildAgent.properties file

system.FxCopRoot = c: \\ Program Files (x86) \\ Microsoft FxCop 1.36

Make sure you avoid the colon and backslash.

bin, , FxCop. FxCop; , FxCop tp.

.

+5

" FxCop" ?

, FxCop.exe .

, "" FxCop?

+2

FxCop ROOT BuildAgent...

/f:\Sacog\bin\Debug\Sacog.dll

Sacog.dll . , , , TeamCity FxCop. \ "" " / 3: ".

0

FXCop PATH.

In addition, NAnt contrib has a fxcop task. Use it like this:

  <loadtasks>
    <fileset basedir="${environment::get-variable('NAntContribHome')}">
      <include name="NAnt.Contrib.Tasks.dll" />
    </fileset>
  </loadtasks>


  <target name="fxCop" depends="compile">
    <fxcop analysisReportFilename="fxCopResults.xml" failOnAnalysisError="false" >
      <targets>
        <includes name="BinaryToAnalyse.dll" />
      </targets>
      <rules>
        <includes name="C:\Program Files\Microsoft FxCop 1.36\Rules\*Rules.dll" />
      </rules>
    </fxcop>
  </target>
0
source

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


All Articles