2010-03-25 2 views
1

NAnt 빌드 파일에서 구현 한 FxCop 속성을 실행해야합니다. NAnt 및 NAntContrib가 있습니다. nantcontrib\bin의 내용을 nant \ bin 폴더에 복사했으며 환경 변수를 FxCopCmd.exe으로 설정했습니다.fxcop을 사용하기위한 nant nantcontrib 설정

유효하지 않은 속성 (의 FxCop)

어떤 문제가 될 수 : 나는은 NAnt 스크립트를 실행할 때

은 그 때 나는 오류를 받고 있어요?

답변

1

NAnt의 exec 작업을 사용하여 NAntContrib 작업을 사용하지 않고 NAnt에서 직접 FxCop을 호출하는 것이 약간 간단합니다. 구현 세부 정보를 보려면 NAnt와 FxCop을 통합하는 방법에 대해 article I wrote을 살펴보십시오.

<!-- specify location of required tools --> 
<property name="dir.tools" value="tools" /> 

<!-- analyze build for code quality --> 
<target name="analyze.fxcop" depends="build" description="Analyze generated code using FxCop"> 
    <!-- specify location of input and output files --> 
    <property name="fxcop.input" value="wadmt.fxcop" /> 
    <property name="fxcop.output" value="${dir.build}fxcop-results.xml" /> 

    <!-- send the analysis work to the FxCop command-line tool --> 
    <exec program="${dir.tools}fxcopFxCopCmd.exe" failonerror="false"> 
     <arg value="/project:${fxcop.input}" /> <!-- use the fxcop project file --> 
     <arg value="/forceoutput" /> <!-- create output even if no violations are found --> 
     <arg value="/summary" /> <!-- show some summary info --> 
     <arg value="/out:${fxcop.output}" /> <!-- specify an output file --> 
    </exec> 
</target> 
: 여기

코드입니다