GitHub Copilot Customization Explained for Beginners: Instructions, Prompt Files, Skills, Agents, and Hooks  Introduction If you've recently started using GitHub Copilot, you've probably come across terms like Instructions , Prompt Files , Skills , Agents , and Hooks . At first glance, they all seem to do the same thing—they tell Copilot what to do. So why does GitHub have five different customization features? The answer is simple: each feature solves a different problem. Think of GitHub Copilot as a new developer joining your team. On their first day, you don't just hand them code. You explain your coding standards, give them reusable templates, teach them specialized knowledge, assign them a role, and automate repetitive tasks. That's exactly how GitHub Copilot customization works. In this article, you'll learn what each feature does, when to use it, and how they all work together. By the end, you'll know which feature to start with and which ones can wait un...

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 references and Nuget packages will not only keep your solution clean but also helps to save space and reduce the startup time of your application. Also if you're not removing unused references then the compiler loads metadata that will never be used. In summary, it's always a good practice to tidy up projects and Nuget package which are not in use.

Let's look in action at how we can leverage this feature in Visual Studio 2019. 

Pre-requisites: Visual Studio Version 16.10.0 (official release) and any existing .NET project.

  • I have a small console application in which have added a couple of Nuget packages like Serilog, Azure Storage DataLake which are not been referenced in the application code. Additionally have added a library project within the solution and referenced it in the console application with no code reference usage.
Project Structure with references
  •  Now let's navigate to Solution Explorer and right-click on the project which we need to analyze for "Unused project and Nuget package references" 
Option for "Remove Unused References..."
  • Once we click on "Remove Unused References..." it pops with a dialog of unused packages and project references with the option to "Remove" or "Keep" as shown below. If there are no unused project references then it shows "No unused references were found".
Analyzed Results
  • Once you click on "Apply" you will be presented with the below window and clicking on "Yes" unused project references will be removed.
Removed unused project and package references



Comments

Popular posts from this blog

Azure Front Door vs Azure Traffic Manager?

Authenticate Azure Functions - API Keys