Reputation: 5803
Any ideas as to how to make this error message go away?
Cannot run 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
Upvotes: 3
Views: 3673
Reputation:
I had to set the following in buildAgent.properties file
system.FxCopRoot=c:\\Program Files (x86)\\Microsoft FxCop 1.36
Make sure to escape the colon and backslashes.
Then I had to create an artifact from my compile build configuration of the bin folder containing the assemblies I wanted FxCop to look at. Then I had to create an artifact dependency on that artifact in the FxCop build configuration; otherwise there were not any assemblies available for FxCop tp operate on.
That did the trick for me.
Upvotes: 6
Reputation: 131
Have you set "FxCop installation root" setting in the runner configuration?
If you have, please remove FxCop.exe from the end.
If not, could you post here the content of Settings tab from your FxCop build page?
Upvotes: 2
Reputation: 7171
Just add the FXCop path to the PATH environment variable.
Also, NAnt contrib has a fxcop task. Use it like so:
<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>
Upvotes: 0
Reputation: 9861
FxCop is attempting to test code at the ROOT of the BuildAgent's drive... the switch
/f:\Sacog\bin\Debug\Sacog.dll
Is trying to get Sacog.dll from the root of that drive. This is probably from the list of files that you have configured in TeamCity for FxCop to analyze. Remove the \
at the beginning of the file name in the "Assemblies" section on the "Build Configuration / Step 3: Runner" configuration screen.
Upvotes: 0