Create and Test an ASP.NET Core App in Azure Pipelines

1 hour
  • 2 Learning Objectives

About this Hands-on Lab

You have a .NET Core application (with tests) that you need to push to Azure Repos, then build and test. You will be provided with the code, with which you must use Azure DevOps to complete these tasks.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create a DevOps Project and Push Code to Azure Repos
  • Sign in to the Azure Portal
  • Search for Azure DevOps in the services menu
  • Create a new Azure DevOps organization and project
  • Pull code from the unit-test branch of this GitHub repo
  • Change the remote origin
  • Push code to Azure Repos using a Personal Access Token (PAT)
Create a New Azure DevOps Pipeline
  • Go to Azure DevOps Pipelines and create a new pipeline with continuous integration
  • Make a change to Index.cshtml and push to the main branch
  • Verify job success

Additional Resources

  • Log in to the Azure portal, and go to Azure DevOps Organizations from the Services menu.
  • Continue to create a new DevOps organization as well as a new project.
  • Use the following code from the unit-tests branch to build your pipeline: https://github.com/ACloudGuru-Resources/content-az400-lab-resources.git.
  • Create an Azure DevOps Pipeline with the .NET Core template (in the classic editor).
  • The Error.cshtml and Index.cshtml files can be found at: /home/cloud_user/content-az400-lab-resources/AspNetCoreWebApplication/Views/Home.
  • Change the location of the test .csproj files, add continuous integration, and run the build by pushing changes to the unit-tests branch.

Once you've verified the success of the build job, you will have completed this hands-on lab.

Update:  For the agent specification, use ubuntu-18.04

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?