When I run TFS 2013 with sonar I get the following error: No ProjectInfo.xml files were found. Check that the analysis targets are referenced by the MSBuild projects being built.
Message: TF270015: 'SonarQube.MSBuild.Runner.exe' returned an unexpected exit code. Expected '0'; actual '1'.
I use :
- sonarqube-5.1.zip
- sonar-csharp-plugin-4.0.jar
- SonarQube.MSBuild.Runner-0.9.zip
- sonar-runner-dist-2.4.zip
I've followed instructions found in "SonarQube Installation Guide for Existing TFS Environment.pdf".
Any help ?
Thank you.
Log :
SonarQube Analysis Summary Analysis failed for SonarQube project "WpfApplication2", version 1.0 Product projects: 0, test projects: 0 Invalid projects: 0, skipped projects: 0, excluded projects: 0 Résumé Debug | x86 0 erreur(s), 1 avertissement(s) $/Essai2/WpfApplication2/WpfApplication2.sln - 0 erreur(s), 1 avertissement(s), Afficher le fichier journal C:\Builds\1\Essai2\WpfApplication2\src\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2.sln.metaproj : The specified solution configuration "Debug|x86" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration. $/Essai2/WpfApplication2/WpfApplication2.sln compilé Aucun résultat des tests Aucun résultat de couverture du code Autres erreurs et avertissements 2 erreur(s), 0 avertissement(s) 01:45:52: No ProjectInfo.xml files were found. Check that the analysis targets are referenced by the MSBuild projects being built. Exception Message: TF270015: 'SonarQube.MSBuild.Runner.exe' returned an unexpected exit code. Expected '0'; actual '1'. See the build logs for more details. (type UnexpectedExitCodeException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Here is the Diagnostic (I truncated the source check out part) :
Compile, Test and Publish00:00:46 Run optional script before MSBuild00:00:08 InputsEnvironmentVariables: Enabled: True Arguments: /key:WpfApplication2 /name:WpfApplication2 /version:1.0 FilePath: C:\sonarqube\bin\SonarQube.MSBuild.Runner.exe OutputsResult: 0 C:\sonarqube\bin\SonarQube.MSBuild.Runner.exe /key:WpfApplication2 /name:WpfApplication2 /version:1.0 Pre-processing (3 arguments passed) Using environment variables to determine the download directory... Using environment variable 'TF_BUILD_BUILDDIRECTORY', value 'C:\Builds\1\Essai2\WpfApplication2' Creating the analysis bin directory: C:\Builds\1\Essai2\WpfApplication2\sqtemp\bin SonarQube server url: http://localhost:9000 Downloading SonarQube.MSBuild.Runner.Implementation.zip from http://localhost:9000/static/csharp/SonarQube.MSBuild.Runner.Implementation.zip to C:\Builds\1\Essai2\WpfApplication2\sqtemp\bin\SonarQube.MSBuild.Runner.Implementation.zip Executing file C:\Builds\1\Essai2\WpfApplication2\sqtemp\bin\SonarQube.MSBuild.PreProcessor.exe Args: "/key:WpfApplication2" "/name:WpfApplication2" "/version:1.0" Working directory: C:\Builds\1\Essai2\WpfApplication2\sqtemp\bin Timeout (ms):300000 Process id: 4168 01:45:11: The path to the sonar-runner.properties file was not supplied on the command line. Attempting to locate the file... 01:45:11: Located the runner properties file: C:\sonar-runner-2.4\conf\sonar-runner.properties 01:45:11: Legacy TeamBuild environment detected 01:45:11: Creating config and output folders... 01:45:11: Removing the existing directory: C:\Builds\1\Essai2\WpfApplication2\sqtemp\conf 01:45:11: Creating directory: C:\Builds\1\Essai2\WpfApplication2\sqtemp\conf 01:45:11: Removing the existing directory: C:\Builds\1\Essai2\WpfApplication2\sqtemp\out 01:45:11: Creating directory: C:\Builds\1\Essai2\WpfApplication2\sqtemp\out Generating the FxCop ruleset... 01:45:14: Saving the config file to C:\Builds\1\Essai2\WpfApplication2\sqtemp\conf\SonarQubeAnalysisConfig.xml Process returned exit code 0 Run MSBuild00:00:12 InputsProjectsToBuild: String[] Array MSBuildMultiProc: True Verbosity: Normal ToolPlatform: Auto Targets: RunCodeAnalysis: AsConfigured CommandLineArguments: /p:SkipInvalidConfigurations=true /p:Configuration=Debug /p:Platform="Any CPU" ConfigurationsToBuild: String[] Array OutputLocation: SingleFolder Enabled: True ToolVersion: CleanBuild: True OutDir: RestoreNuGetPackages: True C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\nuget.exe restore "C:\Builds\1\Essai2\WpfApplication2\src\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2.sln" -NonInteractive C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe /nologo /noconsolelogger "C:\Builds\1\Essai2\WpfApplication2\src\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2.sln" /nr:False /fl /flp:"logfile=C:\Builds\1\Essai2\WpfApplication2\src\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2.log;encoding=Unicode;verbosity=normal" /p:SkipInvalidConfigurations=true /p:Configuration=Debug /p:Platform="Any CPU" /m /p:OutDir="C:\Builds\1\Essai2\WpfApplication2\bin\\" /p:Configuration="Debug" /p:Platform="x86" /p:VCBuildOverride="C:\Builds\1\Essai2\WpfApplication2\src\documents\visual studio 2013\Projects\WpfApplication2\WpfApplication2.sln.x86.Debug.vsprops" /dl:WorkflowCentralLogger,"C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;BuildUri=vstfs:///Build/Build/52;IgnoreDuplicateProjects=False;InformationNodeId=12;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;LogProjectNodes=True;LogWarnings=True;TFSUrl=http://localhost:8080/tfs/DefaultCollection;"*WorkflowForwardingLogger,"C:\Program Files\Microsoft Team Foundation Server 12.0\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;" /p:BuildId="dbda6e4d-d5bc-4eed-8b3e-6cc79e3721cc,vstfs:///Build/Build/52" /p:BuildLabel="WpfApplication2_20150615.3" /p:BuildTimestamp="Mon, 15 Jun 2015 11:44:59 GMT" /p:BuildSourceVersion="LWpfApplication2_20150615.3@$/Essai2" /p:BuildDefinition="WpfApplication2" Run optional script after MSBuild00:00:00 InputsEnvironmentVariables: Enabled: True Arguments: FilePath: OutputsResult: 0 Run optional script before Test Runner00:00:00 InputsEnvironmentVariables: Enabled: True Arguments: FilePath: OutputsResult: 0 Run VS Test Runner00:00:00 InputsTestSpecs: BuildParameter[] Array Enabled: False ConfigurationsToTest: String[] Array OutDir: This activity was not run since its Enabled property was set to False. Run optional script after Test Runner00:00:25 InputsEnvironmentVariables: Enabled: True Arguments: FilePath: C:\sonarqube\bin\SonarQube.MSBuild.Runner.exe OutputsResult: 0 C:\sonarqube\bin\SonarQube.MSBuild.Runner.exe Post-processing (no arguments passed) Using environment variables to determine the download directory... Using environment variable 'TF_BUILD_BUILDDIRECTORY', value 'C:\Builds\1\Essai2\WpfApplication2' Executing file C:\Builds\1\Essai2\WpfApplication2\sqtemp\bin\SonarQube.MSBuild.PostProcessor.exe Args: Working directory: C:\Builds\1\Essai2\WpfApplication2\sqtemp\bin Timeout (ms):3600000 Process id: 6548 01:45:28: Legacy TeamBuild environment detected 01:45:28: Loading the SonarQube analysis config from C:\Builds\1\Essai2\WpfApplication2\sqtemp\conf\SonarQubeAnalysisConfig.xml 01:45:28: Legacy TeamBuild environment detected 01:45:28: Attempting to locate the CodeCoverage.exe tool... 01:45:28: Code coverage command line tool: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Team Tools\Dynamic Code Coverage Tools\CodeCoverage.exe 01:45:28: Fetching code coverage report information from TFS... 01:45:28: Connecting to TFS... 01:45:29: Fetching build information... 01:45:30: Fetch code coverage report info... 01:45:52: Operation timed out, Elapsed time (ms): 20358 01:45:52: ...done. 01:45:52: No code coverage reports were found for the current build. 01:45:52: Generating SonarQube project properties file to C:\Builds\1\Essai2\WpfApplication2\sqtemp\out\sonar-project.properties 01:45:52: No ProjectInfo.xml files were found. Check that the analysis targets are referenced by the MSBuild projects being built. 01:45:52: Writing processing summary to C:\Builds\1\Essai2\WpfApplication2\sqtemp\out\ProjectInfo.log 01:45:52: Generation of the sonar-properties file failed. Unable to complete SonarQube analysis. 01:45:52: Updating the TeamBuild summary... Process returned exit code 1 Exception Message: TF270015: 'SonarQube.MSBuild.Runner.exe' returned an unexpected exit code. Expected '0'; actual '1'. See the build logs for more details. (type UnexpectedExitCodeException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation) Handle Exception