0

We are using TFS to build our projects and for analysis using Sonarqube Msbuild Runner however some of our project are bound to be builded in multiple configurations (Debug|Release) and apparently sonarqube msbuild runner doesn't support multiple configuration. In the error message (below) suggested analyzing each configuration separately but we don't know how, due the fact that we are just calling runner with begin and end in our TFS xaml build process and everything happens automatically.

Is there a way to analyze both configuration separately or analyzing just one of them?

This is the error message that we are catching in our TFS build report:

No analysable projects were found but some duplicate project IDs were found. Possible cause: you are building multiple configurations (e.g. DEBUG|x86 and RELEASE|x64) at the same time, which is not supported by the SonarQube integration. Please build and analyse each configuration individually.

Thank you in advance.

Saeed
  • 56
  • 9

1 Answers1

1

You can try to add two pairs of Sonarqube in your build definition and specify the platform and configuration for your project.

Or declare the build variables BuildPlatform and BuildConfiguration on the Variables tab and and reference it here as $(BuildConfiguration). This way you can modify the platform when you queue the build.

enter image description here

Cece Dong - MSFT
  • 29,631
  • 1
  • 24
  • 39
  • Thank you sir, sorry but I forgot to mention that we are using TFS 2013 and xaml build system. I know It is possible to do kind of change in the xaml build process and calling two separate MSbuild activity with different configuration (I have done so many customization on xaml build process like this), however due to the build configurations and settings in the build definition, I do not think it is a right way to achieve such a goal. And really there is no way to choose which configuration sonar should analyze? – Saeed Aug 06 '16 at 05:33
  • According to this website http://sonarqube-archive.15.x6.nabble.com/C-MSBuildRunner-with-multiple-build-configurations-td5035476.html, SanarQube has no plans at the moment to support multiple configurations in the short term. Since you are using XAML build, you may try to specify the Configuration under Build section in your build definition. – Cece Dong - MSFT Aug 08 '16 at 02:52