Posts

Showing posts from October, 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

Swagger UI for Azure Function v2 & v3 APIs

Image
In this blog post, we will see how to setup Swagger UI for Azure Function APIs in v2 and v3. Now you might be wondering why Swagger? Swagger is a language-agnostic specification for describing REST APIs, it also referred to as OpenAPI. Swagger UI offers a web-based UI that provides information about your REST APIs service. Prerequisites HTTP trigger Azure function provisioned or created in C# Azure DI enabled on Azure Function, for more details refer here  with relevant package version installed based on Azure Function version. Integrating Swagger UI into our Applications 1. Install the appropriate package based on the Azure Function version which you are dealing with from the below table. Unfortunately, it's not a single package for both versions due to Azure function v3 because v3 makes use of ASP.NET Core 3.1 which introduces a new serializer System.Text.Json (STJ) out-of-the-box.  Azure Function Version  Nuget package  v2               AzureFunctions.Extensions.Swashbuckle  v3

Azure DevOps Tips: How to set default branch name for new repos?

Image
Recently Azure DevOps came up with a new feature of setting the default branch name for new code repos. Based on my experience, most of the projects or organizations use the master branch to refer to the official release history (which is deployed into production), and the develop branch serves as the integration branch for features.  Azure DevOps Git Repositories by default the branch name is set to master, and whenever we create new repositories, it takes that as default. In a nutshell, if organizations who are following Gitflow Workflow  having the default branch as a master doesn't work well, which means as part of creating a new repository need to follow a two-step process where first they need to create a repo and then navigate to branches of the project  à  select the branch of your preference and click on the three-dot icon to set as the default branch. Set Default Branch - old way How to set the Default branch name for new repos in Azure DevOps? With the new feature annou