2016-08-05 24 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并展开'测试工具'部分。代码覆盖率仅针对企业版列出。