Working with your corporate NUGET package feed in Visual Studio online

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

If you want to create your corporate NUGET repository Visual Studio Online provides a ne feature called “package”.

image

More information about this can be found here. In this post I will show shortly recap of most important steps, which demonstrates how to create a feed, upload the package and finally to reference a package. 

To get started with package sharing you need to do few steps.
First of you have to create a feed, which is accessible collection of your nuget packages.

image

As next you have to add that feed as package source in Visual Studio:

image

Select in the first combo-box NuGet and then download (click on button ‘Bundle…’) all required command line tools. These tools contains a version of NuGet, which has authentication provider for VS online feed. Note, some other versions of NuGet (even newer) might NOT work.

No you can publish (upload) your package to the feed.

C:\Users\me>nuget push C:\Users\me\AMQPNetLite.1.2.0.nupkg -Source https://me.pkgs.visualstudio.com/_packaging/mainfeed/nuget/v3/index.json -ApiKey mainfeed

You will have to provide your credentials and finally you will get following output:

Pushing AMQPNetLite 1.2.0 to 'https://me.pkgs.visualstudio.com/_packaging/7cc7-*****8/nuget/v2/'...

After successful push, you can go to TFS online packages section and look for your package.

image

Go back to Visual Studio, reference your package source and add a reference to package:

image


Posted Jul 19 2016, 07:36 AM by Damir Dobric
Filed under: ,
developers.de is a .Net Community Blog powered by daenet GmbH.