[Updated August 28th 2015]: If you are using Visual Studio Online, you now have a simpler way of analyzing your .Net code leveraging the Build Tasks for SonarQube Analysis
Release of MSBuild.SonarQube.Runner 1.0
As you might recall, we announced back in April at the //build conference that we were working with SonarSource to provide a better integration of SonarQube with MSBuild and Team Foundation Server. At that time, SonarSource shipped the result of this initial collaboration, the SonarQube.MSBuild.Runner 0.9, which enabled the analysis of technical debt during a build in TFS 2013. The ALM Rangers also produced a nice guidance document explaining how to install SonarQube, especially with SQL Server.
The collaboration has continued, and yesterday SonarSource released a new version of this integration, together with new versions of their related SonarQube plug-ins:
· SonarQube C# plug-in 4.1 (available directly from the SonarQube update center)
· SonarQube VB plug-in (available directly from the SonarQube update center)
Meanwhile, Hosam Kamel from the ALM Rangers has transformed the installation guidance into a markdown format and it’s now available as an Open Source project of its own on GitHub, enabling the community to propose contributions to the guidance (PDF, Markdown). The document has been updated for the new version, and includes an appendix describing how to upgrade from v0.9.
The April version filled a gap in the sense that it enabled the simple and reliable analysis of Visual Studio solutions and projects as part of a XAML build in TFS 2013. However, it did not support a number of commonly-used plug-ins such as those for StyleCop, ReSharper, and VB.NET. We soon received feedback that we needed to make it possible to simply integrate them, as well as other tools—though this was actually already high on our backlog. Furthermore, it was not possible to run an analysis on your local development machine using the command line either, and some customers and partners thought that this would be very useful. Finally, the installation of the MSBuild integration on the agent was still a bit complicated, as it required the user to manually install the SonarRunner and manually install build targets to a location that required administrator privileges.
The new MSBuild.SonarQube.Runner 1.0 fixes these issues by enabling:
- Simplified installation. The MSBuild.SonarQube.Runner is now installed by unzipping three files, and perhaps making changes to a new XML configuration. The only pre-requisite is Java.
- Execution of additional SonarQube plug-ins by making it possible to pass parameters to the SonarQube analysis in many different ways.
- Execution on the command line to perform a local analysis.
- Accepting source files other than C# (including TypeScript, which was requested by customers)
- A number of bugs were fixed, and support was added for analysing code in Visual Studio Online. Details are in the release notes.
The cooperation with SonarSource is ongoing. The next new feature you should see (in VSO) is the implementation of SonarQube analysis build tasks for the new build system. Stay tuned, we’ll share our future plans soon.
As usual, we look forward to hearing from you – please send us your feedback. You can raise bugs on GitHub. You can also propose suggestions on what you would like us to do next, for instance from User Voice.