Posts

Showing posts from January, 2020

Tidy up - Unused Project and Nuget package reference using Visual Studio 2019

If you are a Developer/Architect using Visual Studio as IDE for your development activities, this blog post will be of your interest. During the Ignite 2021 conference, Microsoft released Visual Studio 2019 v16.9 and v16.10 Preview 1. As part of version 16.10 Preview 1, one of the cool features they introduced is to "Remove Unused References..." for any Projects and Nuget packages that are not in use. At the time of writing this blog post, we have Visual Studio Version 16.10.0 (official release) which includes this new feature.  As part of development, we generally get carried away and introduce new Nuget package references to your project and add new references to your Projects. By the end of development, you will not be 100% sure which are not being referenced and unused which means you will leave those unused project references in your application. Now you might be wondering what's the big deal in it since it doesn't harm. The advantage of removing unused project r

Building a CI pipeline for Containerized Asp.NET Core 3.1 using Docker Registry

Image
This is continuation   of a series of posts on using Docker and containerization with .Net Core. If you are new to this series its recommend to look at Getting started with Docker and Containers In this post will show how to setup a pipeline that continuously builds a repository that contains a Docker file. Every time you change your code, the image is pushed to Docker Hub. Pre requisites 1.      Github account 2.      Azure DevOps Organisation if you don’t have one, you can create for free 3.      Ensure you’re administrator of the Azure DevOps project 4.      Docker hub repository – more details can be found here 5.      Azure Project to be created in Azure DevOps Get the code from GitHub https://tinyurl.com/ydtggef6 Create the Pipeline 1.      Sign in to your Azure DevOps Organisation and navigate to your project 2.      Go to Pipelines and click on New Pipeline 3.      Select where is your code from the below screen. In our example its on Gi

Setting up Azure Service Connection in Azure DevOps

Image
You can specify your Azure subscription directly in the release pipeline task, or you can use an organiz ational account or a  Service Principal and configure Service connection in Azure DevOps.  In this post will see how Service Principal can be created. Tools which can be used to create Service Principal in Azure: Using   Azure PowerShell Using   Azure Portal Using   Azure CLI 2.0 Portal Irrespective of the tool choice commands remain same. There are two types of authentication available for service principals: Password-based authentication, and certificate-based authentication.This post we will be looking demonstrating Password-based authentication. Steps 1.       Log into Azure by running the below command. When prompted, open the browser and login with Microsoft credentials. az login 2.       Create a Service Principal by running the following command. The output displayed will be similar to the screenshot below. az ad sp create-for-rbac --na