Question: We install some packages via a PowerShell pre-build script in our CI build. Recently, we're been receiving Partially Successful email notifications with the following information provided:

> 
> 'Microsoft.CSharp' already has a dependency defined for 'System.Dynamic.Runtime'
> 
> 
> 

Here is the command from the PowerShell script that generates the information:

```
cd $source\MyNet\MyWeb\MyComp.WebViewer\packages
&"C:\Program Files\Microsoft Team Foundation Server 14.0\Tools\Nuget.exe" install newtonsoft.json

```

I would like to be able to handle/ignore this message so that fully Successful build notifications are received.

It doesn't seem to be causing any problems otherwise.

Does anyone have any nuget.exe command line parameters that might bypass such an error?

Answer: 
The error message `already has a dependency defined for` usually indicates that the version of NuGet you are using is too old. So you should look at updating it.

This particular error can happen when the NuGet packages being used are using a group dependency with a target framework which the version of NuGet you are using does not know about.
I had a similar problem using NuGet to load the Google.Apis.Sheets.v4.

Upgrading my VS.NET 2013 from NuGet 2.8.60723.765 to 2.12.0.817 resolved it.

To see your NuGet version number, go to the Package Manager Console prompt (PM>) with Tools / NuGet Package Manager / Package Manager Console. Then, enter "$host" at the PM> prompt.

```
PM> $host

Name             : Package Manager Host
Version          : 2.12.0.817
InstanceId       : 38c7734c-3169-4933-b934-23dab18055f2
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : NuGetConsole.Host.PowerShell.Implementation.NuGetPSHost+Commander
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace

PM> 

```

To update NuGet, select Tools / Extensions and Updates... . Then, select "Updates" followed by clicking on the "Update" button of the "NuGet Package Manager". 

[![enter image description here](https://i.stack.imgur.com/xsT9K.jpg)](https://i.stack.imgur.com/xsT9K.jpg)

After the update completes, restart Visual Studio and re-check the NuGet version number.