0

Team City でビルド ステップとして FxCop を実行すると、次のエラーが発生します: * 分析は実行されませんでした。少なくとも 1 つの有効なルール アセンブリと 1 つの有効なターゲット ファイルを指定する必要があります。ただし、すべてのルール Dll が読み込まれます。エラーログは次のとおりです。

[23:39:07][Step 5/5] Used custom FxCop home directory 
[23:39:07][Step 5/5] Starting: "C:\Program Files (x86)\Microsoft Fxcop 10.0\FxCopCmd.exe" 
                        /forceoutput /gac /ignoregeneratedcode "/project:branches/PaninRoot/LatestCode/TechnicalHelp/Panin List Of Rules.FxCop" 
                        /out:C:\BuildAgent\temp\buildTmp\fxcop-output-829310073154064004\fxcop-result.xml
[23:39:07][Step 5/5] in directory: C:\BuildAgent\work\39c68aea6b50c527 
[23:39:09][Step 5/5] Microsoft (R) FxCop Command-Line Tool, Version 10.0 (10.0.30319.1) X86 
[23:39:09][Step 5/5] Copyright (C) Microsoft Corporation, All Rights Reserved.
[23:39:09][Step 5/5] 
[23:39:09][Step 5/5] Loading branches/PaninRoot/LatestCode/TechnicalHelp/Panin List Of Rules.FxCop...
[23:39:09][Step 5/5] Loaded DesignRules.dll...
[23:39:10][Step 5/5] Loaded NamingRules.dll...
[23:39:10][Step 5/5] Loaded PerformanceRules.dll...
[23:39:10][Step5/5] Loaded SecurityRules.dll...
[23:39:10][Step 5/5] Loaded UsageRules.dll... 
[23:39:10][Step 5/5] * Analysis was not performed; at least one valid rules assembly and one valid
[23:39:10][Step 5/5] target file must be specified.
[23:39:10][Step 5/5] * 1 total analysis engine exceptions.
[23:39:11][Step 5/5] Writing report toC:\BuildAgent\temp\buildTmp\fxcop-output-829310073154064004\fxcop-result.xml...
[23:39:11][Step 5/5] Done:00:00:03.1101779
[23:39:11][Step 5/5] Process exited with code 1
[23:39:11][Step 5/5] FxCop return code (1): ANALYSIS_ERROR
[23:39:11][Step 5/5] Analysis errors ignored as 'Fail on analysis errors' option unchecked
[23:39:11][Step 5/5] Publishing artifacts
[23:39:11][Publishing artifacts] Collecting files to publish[C:\BuildAgent\temp\buildTmp\fxcop-output-829310073154064004\fxcopresult.xml=>.teamcity/FxCop/] 
[23:39:11][Publishing artifacts] Sending C:/BuildAgent/temp/buildTmp/fxcop-output-829310073154064004/fxcop-result.xml 
[23:39:11][Step 5/5] Importing inspection results 
[23:39:11][Step 5/5] FxCop error: Keyword=CA0052 Kind=Engine Type=Microsoft.FxCop.Sdk.FxCopException No targets were selected. 
[23:39:11][Step 5/5] Skipped html report generation since not requested 
[23:39:11]Publishing internal artifacts 
[23:39:11][Publishing internal artifacts] Sending build.finish.properties.gz file 
[23:39:11]Total:0(+0 -0)Errors: 0(+0 -0) 
[23:39:11]Build finished
4

1 に答える 1

0

branches/PaninRoot/LatestCode/TechnicalHelp/Panin List Of Rules.FxCopプロジェクト ファイルが問題の原因であると思われます。最初に確認することは、ターゲット ファイル (分析するアセンブリ) へのパスが相対パスか絶対パスかです。それらが絶対パスである場合、ビルド サーバーのパスと一致しない可能性があります。

于 2013-06-20T12:44:41.087 に答える