2013-06-20 42 views
0

在團隊城市中運行FxCop作爲構建步驟出現以下錯誤: *分析未執行;至少必須指定一個有效的規則程序集和一個有效的目標文件。 但是,所有規則Dll都已加載。 以下是錯誤日誌:FxCop在TeamCity中不工作

[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 

回答

0

我懷疑你branches/PaninRoot/LatestCode/TechnicalHelp/Panin List Of Rules.FxCop項目文件引起的問題。首先要檢查的是它到目標文件(你想分析的程序集)的路徑是相對的還是絕對的。如果它們是絕對的,那麼它們可能與構建服務器上的路徑不匹配。

+0

感謝Nic,它爲我工作。 – Apoorve

相關問題