2016-08-05 27 views
0

我有一個使用.Net Framework 4.5.1的ASP.Net Web應用程序,它建立在TFS Buildserver(內部部署)上,但是SonarQube不執行分析。所有其他的構建都是成功的。 SonarQube 6.0是一種全新的安裝方式,Runner安裝在一年前。 SonarQube和Builds必需的.Net框架安裝在構建機器上。SonarQube 6.0在TFS 2015上找不到項目

在WebAPI項目上,分析器的工作原理就像一個魅力。會是什麼呢?

****************************************************************************** 
Starting task: Fetch the Quality Profile from SonarQube 
****************************************************************************** 
Executing the powershell script: C:\Agents\Agent1\tasks\SonarQubePreBuild\1.0.34\SonarQubePreBuild.ps1 
SonarQube Scanner for MSBuild 1.1 
Default properties file was not found at C:\Agents\Agent1\tasks\SonarQubePreBuild\1.0.34\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml 
Pre-processing started. 
Preparing working directories... 
Checking for updates... 
SonarQube Scanner for MSBuild Begin Step 2.1 
14:41:58.919 Default properties file was not found at C:\Agents\Agent1\_work\14\.sonarqube\bin\SonarQube.Analysis.xml 
14:41:58.929 Updating build integration targets... 
14:41:58.939 Fetching analysis configuration settings... 
14:41:59.039 Generating rulesets... 
14:42:00.119 Provisioning analyzer assemblies... 
14:42:00.119 Installing required Roslyn analyzers... 
Pre-processing succeeded. 
****************************************************************************** 
Finishing task: SonarQubePreBuild 
****************************************************************************** 

...樓宇解決方案,發佈符號&降...

****************************************************************************** 
Starting task: Finish the analysis and upload the results to SonarQube 
****************************************************************************** 
Executing the powershell script: C:\Agents\Agent1\tasks\SonarQubePostTest\1.0.36\SonarQubePostTest.ps1 
SonarQube Scanner for MSBuild 1.1 
Default properties file was not found at C:\Agents\Agent1\tasks\SonarQubePreBuild\1.0.34\MSBuild.SonarQube.Runner-1.1\SonarQube.Analysis.xml 
Post-processing started. 
SonarQube Scanner for MSBuild End Step 2.1 
14:40:50.486 WARNING: Failed to find the code coverage command line tool. Possible cause: Visual Studio is not installed, or the installed version does not support code coverage. 
The exclude flag has been set so the project will not be analyzed by SonarQube. Project file: C:\Agents\Agent1\_work\14\s\TdbWeb\TdbWeb\TdbWeb.csproj 
No analysable projects were found. SonarQube analysis will not be performed. Check the build summary report for details. 
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis. 
14:40:50.526 Creating a summary markdown file... 
Post-processing failed. Exit code: 1 
Unexpected exit code received from batch file: 1 
The build was not set to fail if the associated quality gate fails. 
****************************************************************************** 
Finishing task: SonarQubePostTest 
****************************************************************************** 
+0

您是否安裝了.NET Framework v4.5.2 +?根據http://docs.sonarqube.org/display/SCAN/From+Team+Foundation+Server+2015+or+Visual+Studio+Team+Services,.NET Framework v4.5.2 +是必需的。 –

+0

是的,.NET Framework v4.5.2,v4.6和v4.6.1以及VS Pro 15 Update 2安裝在構建機器上。 – webdude

+0

您可以雙倍確認您的應用程序是Web應用程序解決方案還是Web站點解決方案? –

回答

0

您需要的代碼覆蓋率Visual Studio企業版,並且使用VS專業版。看看this page並展開'測試工具'部分。代碼覆蓋率僅針對企業版列出。