Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

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

$
0
0

I have a project implemented using .NET 4.6.1. I build this project using TFS. One of the build tasks is to create a nuget package from this project as it contains shared code used by other projects. I recently needed to upgrade the version of Newtonsoft.Json from v9.0.1 to v12.0.1 (I've added some new functionality which forced me to upgrade my version of Newtonsoft.Json).

I'm now getting the error 'Newtonsoft.Json' already has a dependency defined for 'Microsoft.CSharp' from my build task which creates the nuget package.

Here's the build command which creates the nuget package.

NuGet.exe pack "Common.csproj" -OutputDirectory "\packages\Common" -Properties Configuration=Release -version 1.2.3.4

Here's the packages.config file.

<?xml version="1.0" encoding="utf-8"?><packages><package id="Microsoft.IdentityModel.Logging" version="1.1.2" targetFramework="net461" /><package id="Microsoft.IdentityModel.Tokens" version="5.1.2" targetFramework="net461" /><package id="Newtonsoft.Json" version="12.0.1" targetFramework="net461"  /><package id="Sendgrid" version="9.9.0" targetFramework="net452" /><package id="System.IdentityModel.Tokens.Jwt" version="5.1.2" targetFramework="net461" /><package id="System.Net.Http" version="4.0.0" targetFramework="net452" /><package id="Twilio" version="5.23.0" targetFramework="net461" /></packages>

I've had a look at this question but none of those answers are applicable.

Our build server is using nuget version 3.2.1.10581


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>