U4-9848 - Make sure NuGet version 3.4.4+ is installed in NuGet to prevent update errors

Created by Marc Goodson 03 May 2017, 08:07:29 Updated by Shannon Deminick 24 May 2017, 05:41:11

Tags: Unscheduled

Subtask of: U4-9609

Nuget install of Umbraco 7.6 fails in Visual Studio 2015 and below if Nuget Package Manager is less than v 3.5 (VS 2015 ships with version 3,0 of Nuget package manager)


Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp


An error occurred while downloading package 'System.Threading.Tasks.Dataflow 4.6.0' from source 'https://www.nuget.org/api/v2/'

Upgrading to latest Nuget Package manager resolves the issue.

Worth adding a note somewhere to this affect.


Dallas Taylor 13 May 2017, 13:21:08

I was getting the same error in VS 2013 and VS 2015. Even after updating Nuget (2.5 -> 4.0 rc2) I continued to get the same error in VS 2013 but updating Nuget did resolve the issue VS 2015.


Jean-François Dessureault 15 May 2017, 15:41:57

I have upgraded successfully from 7.5.13 to 7.6.1 with VS 2015 (Nuget 3.4.4). However, the build fails on the build server (Jenkins). I've tried updating Nuget on the server, but still no luck. Is there any known fix for build environments with no VS installed?

Excerpt form build log: [...]\.nuget\NuGet.targets(100,9): error : 'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp'. [...]\.nuget\NuGet.targets(100,9): error : 'System.Threading.Tasks.Dataflow' already has a dependency defined for 'System.Collections'.

Sebastiaan Janssen 15 May 2017, 15:52:01

You also need that NuGet version on your build server and make sure to use it.

Sebastiaan Janssen 15 May 2017, 15:56:41

For 7.6.2 we'll update the minClientVersion to help with this issue - https://docs.microsoft.com/en-us/nuget/schema/nuspec#optional-metadata-elements

Sebastiaan Janssen 15 May 2017, 17:01:20

PR https://github.com/umbraco/Umbraco-CMS/pull/1944

Jean-François Dessureault 15 May 2017, 18:24:57

I was indeed updating the wrong instance of nuget.exe on the server. I managed to build with the correct one at 3.5.5. Thanks!

Shannon Deminick 19 May 2017, 02:02:25

@sebastiaan (and @zpqrtbnk since you have been working on build refactoring) we should do a couple of things:

I've pulled in this PR in the meantime

Sebastiaan Janssen 19 May 2017, 08:37:49

@Shandem Yup, that's all really good points! The new build script downloads vLatest nuget.exe indeed, I might have borrowed that from your scripts! ;)

Just to be clear this PR was merely for people actually trying to install Umbraco in their VS. Apparently one or more of our updated dependencies only work on NuGet 3.4+ :)

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.6.0

Due in version: 7.6.2


Story Points:

Cycle: 1