I\'m getting the following error in NuGet while trying to install package Microsoft.AspNet.Server.IIS
Attempting to resolve dependency \'Microso
I was getting the issue 'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp'
on the TeamCity build server.
I changed the "Update Mode" of the Nuget Installer build step from solution file to packages.config and NuGet.exe to the latest version (I had 3.5.0) and it worked !!
The only solution that worked for me was to uninstall nuget completely from Visual Studio 2013 and then install it again with the obligatory restart of VS in between.
I tried the update, but it did not work for me. Helped:
In my case I had to delete the file NuGet.exe in the Project folder/.nuget and rebuild the project.
I also have in NuGet.targets the DownloadNuGetExe marked as true:
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">true</DownloadNuGetExe>
Hope it's helps.
I fixed a similar issue in my solution by:
nuget update -self
This upgraded the copy of NuGet.exe
that was in my solution from 2.8.0
to 3.4.4
, which fixed the 'X' already has a dependency defined for 'Y' error that was stopping it from downloading SSH.NET automatically before building.
(If your solution doesn't have a copy of NuGet.exe
in it - and it might not - then you should try the solution in TN's answer instead)
I was getting this issue on our TeamCity build server. I tried updating NuGet on the build server (via TC) but that didn't work. I finally resolved the problem by changing the "Update Mode" of the Nuget Installer build step from solution file to packages.config
.