Performing Sonar Analysis for .NET projects - Blogs
X
14Feb

Performing Sonar Analysis for .NET projects

 

Sonar Integration with TFS build for .net projects

This document provides details about TFS and Sonar integration for .Net projects. The .net projects can be analyzed using solution properties or adding invoke process in the build process template.

Pre-requisites:

Sonar media download link.

http://docs.codehaus.org/display/SONAR/Installing+and+Configuring+SonarQube+Ant+Task

Installing Sonar.

1.Download sonar-3.7 and sonar-runner-2.3*** unzip folders and copy the contents in c drive.

         Sonar Files

2.Run StartSonar bat files. from :-> sonar-3.7

Sonar Installation

3.       Download sonar plug-in for .net from the below link:

              http://docs.codehaus.org/display/SONAR/C%23+Ecosystem

Download and copy .jar files to “C:\sonar-3.7\extensions\plug-ins” and start sonar runner.

Sonar Plug-in's for .net

The below steps describes both the procedures:

Using Solution Properties

1.       Define sonar-project.properties for you project.

sonar.projectKey=com.mycompany:myCSharpApplication

sonar.projectVersion=1.0-SNAPSHOT

sonar.projectName=My CSHARP Application

 

# Info required for SonarQube

sonar.sources=.   # Always set it this way even if this property is not used

sonar.language=cs

 

2.       Add below line of snippets for  post build event

3.       C:\sonar-runner-2.3\bin\sonar-runner.bat -Dproject.home="$(SolutionDir)." -Dproject.settings="$(SolutionDir)sonar-project.properties"

Or Using Invoke Process

4.      Customize the BuildProcessTemplate. Add InvokeProcess to BuildProcessTemplate locate the 

Run On Agent  à Try Compile, Test, and Associate Changesets and Work Items activity.

 

Customize TFS Build Process Template

5.      Arguments : SourcesDirectory + “\sonar-project.properties

6.      FileName: “C:\soanr-runner-2.3\bin\sonar-runner.bat

Related

Connect apps and integrate data with workflows using Azure Logic Apps

Implementing complex business process has been made easy. Logic Apps in azure provide a way to imple...

Read More >

TFS to VSTS Migrations

The next evolution of TFSWhether you’re a startup or Enterprise or you’re a team of just...

Read More >

CfMD services -Dynamics NAV

CfMD services help ISVs minimize the time and effort needed to get their software solution through t...

Read More >

Upcoming Webinar - Offshore support to North American Dynamics NAV partners

Offshore support to North American Dynamics NAV partners whose customers are moving to NAV '16Wh...

Read More >

Microsoft Azure Consultant

·         Executing technical feasibility as...

Read More >

Customer Feedback

Your feedback is important to us. Please share your experience working with Canarys & the journe...

Read More >

Threading

Multi-taskingIt is a concept of performing multiple tasks over a certain period of time by executing...

Read More >

Partnership Program

We understand that the world of technology is changing rapidly from day to day and businesses have m...

Read More >

Partnership Program

The Canarys Partner Program:Canarys is all set to expand its business reach across the Globe and is ...

Read More >

Upcoming Webinar US - Plugging for Cloud, Right or Wrong

Plugging for Cloud, Right or Wrong?Cloud computing continues to be one of the most advertising topic...

Read More >

Share

Try DevOpSmartBoard Ultimate complete Azure DevOps End-to end reporting tool

Sign Up

  • Recent
  • Popular
  • Tag
Tags
Monthly Archive
Subscribe
Name

Text/HTML
Contact Us
  • *
  • *