What’s new in the latest NuGet 2.5 Update

Hi all,

We are all using beautiful NuGet extension on Visual Studio for a while now. NuGet is being developed by famous people like Scott Hanselman and Phil Haack. 🙂

For people who don’t know what NuGet is; NuGet is a package manager for Visual Studio, works with central package repository http://www.nuget.org. There are 12500 packages currently on the repository and generally it’s enough for your standard project needs. I mean almost every package is there. Which means no more web crawling for popular packages’ download links on the web, download and extract them to add to your project.

In Visual Studio, you can add package by right clicking to solution and select “Manage NuGet Packages for Solution”. Select “Online” from the left menu and search for package name from the right-top search box. When you find your package just click Install and tadaa, it’s done.


Back to our topic, in April 25 they’ve released the latest update. First let me tell you where to find this update; Open Visual Studio, go to Tools -> Extensions and Updates there you will find if your NuGet version needs to be updated. Or you can alternatively go to http://nuget.codeplex.com and download / install manually.

These are the what’s new items in the NuGet web site.

  • Option to overwrite content files
  • Automatic imports of msbuild targets
  • Different references per platform
  • Update All button
  • Improved project reference support for NuGet.exe Pack
  • Add a ‘Minimum NuGet Version’ property to packages
  • Dependencies are no longer unnecessarily updated during package installation
  • NuGet.exe outputs HTTP requests with detailed verbosity
  • NuGet.exe push supports UNC and directory sources
  • NuGet.exe supports explicitly-specified Config files
  • Support for C++ and WiX project types
  • Support for Mono/Xamarin projects targeting iOS, Android, and Mac
  • Package Restore improvements
    (a prototype of the new features will be available as a separate download/installation)

As for me I was waiting for performance updates. You know, when I’m not at home, NuGet package updates are always slow with the phone tethering, client’s or Starbucks’ wireless. 🙂 With this update NuGet does not update if the dependency is satisfied within the project. With that I mean if you have a package in your project lets say A V 1.0.0 and you are trying to install B which is dependant to A V 1.0.0. If repository had A 1.0.2 NuGet was trying to update A before this version. From now on A is not updated.

Also there is another update which is great for resolving package conflicts. You can now overwrite existing package files. If you are using Package Manager Console there is a new property for Update and Install-Package parameters which is FileConflictAction. You can choose whether to Overwrite to always overwrite or Ignore option to skip files. If left empty, you’ll get prompted for every file.

And there is another great feature for people like me working with old projects once in a while. When you open a (relatively) old project, got to NuGet Package Manager by right clicking the solution. Go to “Updates” at the left menu and select “All”. Now there is an “Update All” button to update all packages. So you can stay up to date with the latest version of packages you use in this project. Also keep in mind that NuGet has a cache folder in your computer under %LocalAppData%\NuGet\Cache. When you update a package it is saved into that folder and when you add the same package version into a project it is not downloaded again and again.

There are more updates listed above but for me these are the most important. Thank you NuGet team.