Skip to main content

TFS 2015: The 'System.Collections 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.

After upgrading an existing solution to the new build system in TFS 2015, the build failed with the following errors:
The 'System.Reflection.Extensions 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Reflection.Primitives 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Resources.ResourceManager 4.0.0' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Collections 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Diagnostics.Debug 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.IO 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Reflection 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Runtime 4.0.20' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Runtime.Extensions 4.0.10' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
The 'System.Runtime.InteropServices 4.0.20' package requires NuGet client version '3.0' or above, but the current NuGet version is '2.8.60318.667'.
 It seems that the build server tries to use the 'old' NuGet version instead of the newer 3.x version.



Here is how I solved it:
  • Open your in Team Project in the TFS portal and click on the Build tab
  • Edit the build definition by right clicking on the build and choose Edit... from the context menu
  • Uncheck the 'Restore NuGet packages' checkbox in the Visual Studio Build step

  • Add a new step by clicking on the  'Add build step...' button. Choose the NuGet Installer step in the Package category and click Add. Place this step before the other steps.

  • Open the newly created step, go to the Advanced section and set the path to NuGet.exe(e.g. d:\tools\nuget.exe).

  • Now login on the build server and download the NuGet distribution from https://dist.nuget.org/index.html. Place it on the location as specified in the step.
  • That's it!

Popular posts from this blog

DevToys–A swiss army knife for developers

As a developer there are a lot of small tasks you need to do as part of your coding, debugging and testing activities.  DevToys is an offline windows app that tries to help you with these tasks. Instead of using different websites you get a fully offline experience offering help for a large list of tasks. Many tools are available. Here is the current list: Converters JSON <> YAML Timestamp Number Base Cron Parser Encoders / Decoders HTML URL Base64 Text & Image GZip JWT Decoder Formatters JSON SQL XML Generators Hash (MD5, SHA1, SHA256, SHA512) UUID 1 and 4 Lorem Ipsum Checksum Text Escape / Unescape Inspector & Case Converter Regex Tester Text Comparer XML Validator Markdown Preview Graphic Color B

Help! I accidently enabled HSTS–on localhost

I ran into an issue after accidently enabling HSTS for a website on localhost. This was not an issue for the original website that was running in IIS and had a certificate configured. But when I tried to run an Angular app a little bit later on http://localhost:4200 the browser redirected me immediately to https://localhost . Whoops! That was not what I wanted in this case. To fix it, you need to go the network settings of your browser, there are available at: chrome://net-internals/#hsts edge://net-internals/#hsts brave://net-internals/#hsts Enter ‘localhost’ in the domain textbox under the Delete domain security policies section and hit Delete . That should do the trick…

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.