Adventures on the edge

Learning new development technologies (2015 - 2018)
    "When living on the bleeding edge - you sometimes have to bleed" -BillKrat

Github and Visual Studio continuous integration (automated builds)

You can use Visual Studio’s free service for continuous integration for GitHub as easily as you can for TFS.   In the below clip we show how when we push our changes to GitHub, the Visual Studio CI fires processing the build.

The steps follow below:

1. Create the Visual Studio project, disregard the project setup, and go directly to the “Build and Release” link  and click New. 


Select “GitHub” and log into the system, select your GitHub project from the available list (using … link button)


Click continue, select the .NET Desktop build template and click “Apply”


Be sure to select “Private” default for the agent queue, otherwise you’ll be limited to Hosted free minutes (private is unlimited).  Click the Manage link when done.


From the manage page, download agent to your local drive.


Note: you can simply unzip it to the agent folder using explorer (easier then using suggested PowerShell command).

Before launching PowerShell it is suggested that you click on your login icon, select Security, and then add a Personal Access Token (PAT).  IMPORTANT: Be sure to copy/paste the provided token somewhere for future use – you won’t be able to uninstall/reconfigure your agent without it.


Running as admin, launch PowerShell, switch to the folder you unzipped the agent files to, and type “.\config”.  You can select the default prompts as shown below.  Note: since I have unit test that need to run SQL Server (using my credentials) I logged in as “BillKrat”


The last thing you’ll want to do is click on the “Triggers” link of the build definition and select “Enable continuous integration”.  If you don't check this checkbox then you'll be forced to queue builds - versus it automatically generating a build upon check-in as shown in the video clip above.


When build is completed you will receive an email notification on the status.


Comments are closed