If you want to create your corporate NUGET repository Visual Studio Online provides a ne feature called “package”.
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.
As next you have to add that feed as package source in Visual Studio:
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.
Go back to Visual Studio, reference your package source and add a reference to package:
Posted
Jul 19 2016, 07:36 AM
by
Damir Dobric