Thursday, January 21, 2016

What are the NuGet v. 2 and v. 3 Urls?

I have found myself recently having to bounce back and forth between Visual Studio 2013 and Visual Studio 2015 and if you have not already discovered this for yourself, they use different versions of NuGet as well as different NuGet Urls!

Therefore, when I am setting up Autobuilds in a CI Build Server such as Jetbrains TeamCity, I usually need to configure the appropriate NuGet Server Urls in order to ensure all of the correct NuGet packages are downloaded at build time.

So I needed to know the different NuGet Urls used by the different versions of NuGet!

Well, for NuGet v. 2.x, the Url is the following:
https://www.nuget.org/api/v2/

If you are using NuGet v. 3.x, the Url is slightly different as follows:
https://api.nuget.org/v3/index.json

You can then configure these respective Urls in Visual Studio and your CI Build Server to ensure that all of the NuGet packages are downloaded and restored correctly!

No comments:

Post a Comment