Setting Up CI/CD Pipeline for ASP.NET Core Apps

Setting up Continuous Integration/Continuous Deployment of ASP.NET Core apps to Azure using Visual Studio Team Services (VSTS) can be a bit frustrating especially since the tooling support doesn’t seem to be quite there yet unlike for regular ASP.NET MVC apps. For e.g. you can’t really use the normal Visual Studio build definition template to set up continuous build, you are going to have to use the one for .NET Core apps and since its still in preview I am guessing eventually Microsoft will tighten all the screws on it properly.

The other frustrating bit for me was the fact that I couldn’t get the unit test (written using the XUnit test template which is the default for .NET Core apps in Visual Studio) run report to display in my build report. It took trawling through dozens of blogs, MSDN help forums, git repo wikis and little bit of creative thinking to finally get the CI/CD pipeline working smoothly along with test reports showing in the build summary. Test coverage is still missing but that’s something even the CI/CD for the regular ASP.NET MVC didn’t have (to the best of my knowledge).

So instead of writing an obscenely long blog with dozens of screenshots, I am attaching a shared document that I put together that details all the steps necessary to set-up the CI/CD pipeline for ASP.NET Core apps (with all the screenshots). Hope this helps someone in a similar situation. Alternatively, if you find something that I missed, please feel free to drop a comment here.

One Reply to “Setting Up CI/CD Pipeline for ASP.NET Core Apps”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.