In my project, I have a nuget package "package1" that uses System.Net.Http.dll (reference 4.0.0.0 from .net framework 4.6.2). I also have a nuget package "package2" that references System.Net.Http.dll (name of nuget package System.Net.Http 4.3.4).
How can I make my package "package2" overwrite the old version of the framework on the bin directory by nuspec file? I don't have access to the package code "package1", only access to the package code "package2".
nuspec in package ICI.Doc.WebApi.Cliente:
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>$Id$</id>
<version>$Version$</version>
<title>$Title$</title>
<authors>$Authors$</authors>
<owners>$Owners$</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$Description$</description>
<summary>$Summary$</summary>
<releaseNotes>$ReleaseNotes$</releaseNotes>
<copyright>Copyright © 2019</copyright>
<dependencies>
<dependency id="Microsoft.Rest.ClientRuntime" version="0.9.6" />
<dependency id="Newtonsoft.Json" version="12.0.2" />
<dependency id="System.Net.Http" version="4.3.4" />
<dependency id="System.Security.Cryptography.Algorithms" version="4.3.0" />
<dependency id="System.Security.Cryptography.Encoding" version="4.3.0" />
<dependency id="System.Security.Cryptography.Primitives" version="4.3.0" />
<dependency id="System.Security.Cryptography.X509Certificates" version="4.3.0" />
</dependencies>
</metadata>
<files>
<file src="bin\Release\*.*" target="lib\net462" />
</files>
</package>
project.json in Grh.Negocio:
{
"version": "2.0.0.1",
"dependencies": {
"Grh": "*",
"Grh.Dados": "*",
"ICI.Doc.WebApi.Cliente": "1.0.5.10", //references nuget System.Net.Http 4.3.4
"ICICore.Seguranca": "3.1.0" //references frameworkAssembly System.Net.Http 4.0.0.0
},
"frameworks": {
"net462": {
}
}
}