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.

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

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.

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.

5. Arguments : SourcesDirectory + “\sonar-project.properties
6. FileName: “C:\soanr-runner-2.3\bin\sonar-runner.bat
Related
Implementing complex business process has been made easy. Logic Apps in azure provide a way to imple...
Read More >
The next evolution of TFSWhether you’re a startup or Enterprise or you’re a team of just...
Read More >
CfMD services help ISVs minimize the time and effort needed to get their software solution through t...
Read More >
Offshore support to North American Dynamics NAV partners whose customers are moving to NAV '16Wh...
Read More >
Your feedback is important to us. Please share your experience working with Canarys & the journe...
Read More >
Multi-taskingIt is a concept of performing multiple tasks over a certain period of time by executing...
Read More >
We understand that the world of technology is changing rapidly from day to day and businesses have m...
Read More >
The Canarys Partner Program:Canarys is all set to expand its business reach across the Globe and is ...
Read More >
Plugging for Cloud, Right or Wrong?Cloud computing continues to be one of the most advertising topic...
Read More >
Share