Monday, 20 March 2017

Sonar Server on Azure VM

SonraQube has become grate tool providing detail analysis of code quality. Tracing of history of code quality checks let the development teams identify how the code quality improved (could be how the code is gotten so bad even). How to setup a SonarQube server to use with team foundation server is described in the post “Setting Up Sonar Server for TFS”. Let’s look at steps required to set this up in an Azure virtual machine and expose it to use with team services account.

  1. Setup an Azure virtual machine with Windows Server 2012 R2 Datacenter.
  2. Follow the instructions in the post  “Setting Up Sonar Server for TFS” and get the SonarQube server running inside the virtual machine.
  3. To allow accessing the Sonar server default port 9000 through firewall of the virtual machine add an inbound firewall rule in the virtual machine allowing port 9000 for public and private access.
  4. Above step alone will not allow public access to Azure VM hosted sonar server. You need to allow accessibility in Azure nsg(network security group) for the port. To do this go to the virtual machine in Azure portal, select Network Interfaces and click on the network interface.

Wednesday, 22 February 2017

Resolve MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found or Unable to start the process. No executable found matching command "dotnet-projectmodel-server"

You might encounter compilation error in Visual Studio 2015 when a new .NET Core 1 web app is created, if you have installed Visual Studio 2017 (RC as of now). When a new .NET Core 1 web application is created/opened in Visual Studio 2015, with the project template you get with .NET Core 1.0.1 tools Preview 2, while having ".NET Core cross-platform development" for Visual Studio 2017 in your machine, you might see below error prompted.
---------------------------
Microsoft Visual Studio
---------------------------
The following error occurred attempting to run the project model server process (1.0.0-rc4-004771).

Unable to start the process. No executable found matching command "dotnet-projectmodel-server"
The project model server process provides intellisense, build, and reference information to Visual Studio and without it your experience will be very limited. Please try closing and reopening Visual Studio to see if that corrects the problem. Alternatively, check that the .NET Core SDK is properly installed.
---------------------------
OK  
---------------------------

When attempt to compile the solution you may encounter a compilation error below.
WebApp.xproj(7,3): error MSB4019: The imported project "C:\Program Files\dotnet\sdk\1.0.0-rc4-004771\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Monday, 20 February 2017

SonarQube Extension for VSTS/TFS

In the post Setup SonarQube Analysis with TFS Builds usage of Sonar Server with TFS build to measure quality of code is explained. The task catalogue tasks explained in the post Setup SonarQube Analysis with TFS Builds are now deprecated. There is an extension available in marketplace for SonarQube. This extension provide new begin analysis and end analysis tasks to be used in a TFS build.
Once you install the SonarQube extension for VSTS/TFS you can setup service endpoint type of SonarQube.

Wednesday, 1 February 2017

Bulk Editing Work Items in TFS

There was a question from a team member how to bulk edit TFS work items. In the past the only answer to this question would be use excel. Open a query in Excel and update and publish. Is there any other way to achieve this easily without doing one by one work item edit in a query result? Query result opened in Web or in Visual Studio you can edit each work item by clicking on each, and then save bulk of work items. But is it possible to change a value of a field for many work items at once. Let’s look at the bulk edit options available with TFS see the possibilities.

Monday, 30 January 2017

Trigger a Release Based on Build Tag– VS Team Services

Visual Studio Team Services now supports triggering a release, in team services release management, when a defined tag is available in a completed build. This helps you to filter a build or builds, to get deployed via the release pipeline, out of builds that are successfully completed.
For example a build that is tagged as RTM, would trigger a release while another build, completed successfully, but with no tag is not triggering a deployment. In order to say a release should only be triggered with a given tag, it should be defined in the Triggers tab of the release definition.