Automatically build and deploy ASP.NET Core projects to Azure App Services

Over the last few updates we’ve been working on evening out our support for popular scenarios. Earlier this month we added support for setting up an automated DevOps pipeline in VSTS that pulls source from a public or private GitHub repository. TFVC is another scenario we’re working on to round out the extension. This update continues to round out the Continuous Delivery Tools for Visual Studio extension by adding support for automating the build and deployment of an ASP.NET Core application targeting Azure app services. Now the extension can configure a VSTS build and release definition that can automatically build, test, and deploy any ASP.NET 4.x or ASP.NET Core application. We’ve also continued to fixed bugs we’ve gotten from the community. Thanks!

Configuring Continuous Delivery for an ASP.NET Core project

To configure Continuous Delivery for ASP.NET Core projects, open a solution with an ASP.NET Core project and click on the Configure Continuous Delivery command in the Build menu. If the solution is not already under source control, the extension will guide you through the process.

Configure Continuous Delivery

The Configure Continuous Delivery dialog is pre-populated with a list of Azure subscriptions and App Services available to the personalization currently selected in Visual Studio. The default configuration is a new App Service configuration with a S1 service plan but you can pick an existing app service as well.

Azure Subscriptions and App Services

Click OK and the extension will use the selected app service or create a new one on Azure, then call VSTS to create a build and release definition for the repository on VSTS or GitHub. Now each time you push a new commit a build will start automatically and if that’s successful VSTS deploys the app to the target App Service on Azure.

Build failure notification

Of course if the build fails you’ll get a notification. Clicking the notification will take you to VSTS where you investigate the results.

Investigate build failure results in VSTS

Please keep the feedback coming!

Thank you to everyone who has reached out and shared feedback and ideas so far. We’re always looking for feedback on where to take this Microsoft DevLabs extension next. There’s a Slack channel and a team alias vsdevops@microsoft.com where you can reach out to the team and others in the community sharing ideas on this topic.

Ahmed Metwally, Senior PM, Visual Studio
@cd4vs

Ahmed is a Program Manager on the Visual Studio Platform team focused on improving team collaboration and application lifecycle management integration.