How to send .Net Core NuGet packages to Azure Artifacts

Wesley Camargo
3 min readMay 9, 2020

Learn how you can send .net core NuGet packages to Azure Artifacts.

To increase reusability in our company, an interesting thing that we can consider is to share our packages. Using .net, both core or standard, you can consider NuGet as a package manager. The Azure DevOps has an implementation for a NuGet as a Service named Azure Artifacts.

In this post, I’ll show you how to deploy manually a NuGet package step by step.

Below are all commands used in this tutorial, but I’ll explain each one.

Let’s get the hands dirty!

Creating and configuring an application

To start, we need a .net core class library application. To do this, type on terminal:

dotnet new classlib

It will create a basic project with a .csproj and one class. Rename the class to Math and put the code below on this:

To send new packages, first, we need to configure a connection between our app and the feed that will be created. For now, we’ll add a nuget.config file in our project. On terminal type:

dotnet new nugetconfig

A file like this will be created:

--

--