This assumes you have an Azure account, you can get one for free at /. Select the project in your organization where you want to host the NuGet feed.
Azure Artifacts are used to host package feeds. In the Artifacts tab, create a new feed. Choose a name, set visibility and if you want to include public sources.
Connect to the feed and select “NuGet.exe” in the next screen. This will show you steps required for when you build NuGet packages directly from your solution. We’ll be pushing package from our drive with the NuGet.exe tool. You can get it through the “Get the tools” button or from /downloads. Save the nuget.exe in the directory of your packages on your drive or make it available through your Windows PATH variables.
Note: When ‘Upstream sources’ is checked, any packages downloaded from these sources will be copied to your personal feed. The reasoning behind this is, if for some reason the upstream source is down, your development teams can still download the packages from your personal feed.
However these copied packages do count for your storage billing. Free tiers get 2GB of storage, which is probably more then you’ll need, but it’s important to keep an eye on.
Copy the feed url from the “Project setup” and the command line string from the “Publish packages” to a notepad. In the publish string replace the Source by the url and <packagePath> by the location of your NuGet package.
nuget.exe push -Source
“/BlogDemos/NuGetDemo/_packaging/DemoFeed/nuget/v3/index.json” -ApiKey az “eu.allphi.company.style.1.0.0.nupkg”
Run it from a command prompt, you’ll be asked to login (once) and your package will be pushed.
Now you can add this NuGet feed in Visual Studio as a package source in the NuGet package manager using the same url.
It’s that simple. You can host any NuGet package in your own personal feed.