我需要为Mailchimp API v3.0包装MVC .Net。所以我找到了library。
因此,当我以图书形式安装NuGet包(MailChimp.Net.V3)时,它还会安装它的依赖项: - Microsoft.AspNet.WebApi.Client 5.2.3 - Newtonsoft.Json 8.0.3
问题在于Microsoft.AspNet.WebApi.Client 5.2.3包。它安装得很好,并添加到我的csproj文件:
<Reference Include="System.Net.Http" />
<Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
<Private>True</Private>
</Reference>
但是当我从Mailchimp API v3.0库执行某些函数时,它会抛出错误:
Could not load file or assembly 'System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
有谁知道问题是什么以及如何解决?