DZone
DevOps Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > DevOps Zone > ASP.NET Core Application CI With Visual Studio and Git

ASP.NET Core Application CI With Visual Studio and Git

We're going to see how to do CI for ASP.NET Core 1.0 using use Visualstudio.com as the source control repository and Git as the version controlling system.

Jalpesh Vadgama user avatar by
Jalpesh Vadgama
·
Jan. 03, 17 · DevOps Zone · Tutorial
Like (1)
Save
Tweet
5.47K Views

Join the DZone community and get the full member experience.

Join For Free

Previously, I've written a couple posts about Continuous Integration, and this post is a part of that series. Recently, Microsoft released ASP.NET Core 1.0. In this post, we are going to see how we can do Continuous Integration for the ASP.NET Core application. I am going to use visualstudio.com as our source control repository and Git as our version controlling system. Let’s get started.

The first thing we need to do is create a project into VisualStudio.com like this:

VisualStudioProject

Once you click on Create Project, it will create a project with Git as the version controlling system.

naviagte-to-project

Now our project is ready. Once you click on Navigate to Project, it will load project dashboard like this:

project-dashboard

Now go to the Build and Release section of the project. It will load the page like below.

build-release-visual-studio-com

To enable Continuous Integration for this project, we need to create a new build definition. Click on the green Plus icon on the left side. It will load a wizard to create a build definition. The first screen presented with default templates as seen below.

build-definition-wizard-template-selection

We are going to select the ASP.NET Core build in preview mode. Clicking next will load the source control step as seen below.

build-defintion-git-settings-step

Here, we are using visualstudio.com, so we are not going to change anything. However, we are going select Continuous Integration to enable Continuous Integration as seen below.

build-defintion-git-settings-continuous-integration

Clicking on Create will create a build definition like below.

build-definition-wizard-completion

Click on the Save button to save the build definition. It will open up a dialog like below.

core-build-definition

Clicking on OK will save the build definition. Now we are done with the configuration of Continuous Integration. Now, it's time to add the code to check whether this configuration is working or not. To add code, click on the code menu on visualstudio.com. It will load the following screen.

git-code-page-visualstudio

To configure the repository in Visual Studio, we need to click on the clone in visual studio. It will open Visual Studio IDE.

team-explorer-visual-studio

Clicking on Clone will clone the repository locally, and then we need to create an ASP.NET core application for that repository.

create-net-core-application

Clicking on Open will create an ASP.NET core web application. Once you are done creating the application, we need to push our code to master branch so that we can see whether our Continuous Integration is working or not. To push the changes, go to Team Explorer. It will load screen like below.

team-explor-visual-studio-after-create

Click on Changes to show the changes that have been made to the Git repository as seen below. Put a commit message and click on Commit All.

changes-team-explorer-visual-studio

It will commit changes locally as seen below.

commit-local-team-explorer-visual-studio

Now click on sync. It will load the Synchronization screen like below.

sync-screen-team-explorer

Now click Push to push the committed changes to the remote Git repository.

pushed-changes-visual-studio

It will push changes to the master branch. Now to check Continuous Integration go to build definition section of visualstudio.com. A build should be queued up for the changes we have made as seen below.

build-queued-up

After some time, if your commit changes are fine, it will complete the build.

completed-build-visual-studio

You can see that our Continuous Integration is working fine. It’s pretty easy to set up. Hope you like it; stay tuned for more.

CI/CD ASP.NET ASP.NET Core Git application

Published at DZone with permission of Jalpesh Vadgama, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Legacy Modernization and Hybrid Cloud with Kafka in Healthcare
  • Exhaustive JUNIT5 Testing with Combinations, Permutations, and Products
  • Writing Beautiful, Optimized, and Better .NET Code With NDepend Static Analysis
  • How Low Code Demands More Creativity From Developers

Comments

DevOps Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo