Tips & Tricks, Visual Studio Team Services

Migrating from ProGet or NuGet.Server to VSTS Package Management

For one of my customers I had to migrate their current ProGet server to Visual Studio Team Services (VSTS) Package Management. That is because I am migrating them from TFS 2015 to VSTS. Although documentation is available, it wasn’t completely clear to me, so I wrote this blog.

In the first place I was going to find out how to migrate their ProGet feeds (http://progetserver:81/nuget) to Package Management directly using the ProGet feed URL. I used the following article published by Microsoft: Somehow it doesn’t go into detail on how to use a feed URL as a source. It only uses an SMB share as a source. After a lot of searching and trying I decided I would login to the ProGet server and use the directory where the packages are located directly.

First I manually created a new Feed in VSTS.

On the server I ran the following command from cmd.exe in a directory that contains the nuget executable:
nuget push D:\VstsMigration\**\*.nupkg -Source -ApiKey VSTS -Timeout 900

You’ll need to run this command for every single feed!

Please note the following details:

  • Package Management is more strict than NuGet, check the “Before you start” section in the documentation
  • “mycustomer” would be the name of the VSTS account
  • “myfeed” would be the name of the Package Management feed as created earlier
  • You can use the pattern **\*.nupkg to recurse a directory structure
  • Big feeds can take some time, so add a timeout that would suffice (in this case 900 secs)
  • Running this command could prompt for credentials;

Hope this helps other people too.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s