繁体   English   中英

无法加载文件或程序集“BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null”或其依赖项之一

[英]Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies

我正在尝试将 Walmart .NET SDK 集成到 .NET 4.61 MVC 5 应用程序中。 使用 NuGet,我添加了对 BouncyCastle.Crypto 1.8.1.0 的引用。

SDK 使用 .NET Standard 1.3 并引用 BouncyCastle.Crypto 1.8.1.3:

https://github.com/walmartlabs/partnerapi_sdk_dotnet

1.8.1.3 不适用于 .NET 4.61。

{"Could not load file or assembly 'BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null"}

=== Pre-bind state information ===
LOG: DisplayName = BouncyCastle.Crypto, Version=1.8.1.0, Culture=neutral, PublicKeyToken=null
 (Fully-specified)
LOG: Appbase = file:///C:/Users/example_user/Source/Workspaces/CCC/Test/example_app.Test.DataAccessUnitTest/bin/Debug
LOG: Initial PrivatePath = NULL
Calling assembly : Walmart.Sdk.Base, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\example_user\Source\Workspaces\CCC\Test\example_app.Test.DataAccessUnitTest\bin\Debug\example_app.Test.DataAccessUnitTest.dll.config
LOG: Using host configuration file: 
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/example_user/Source/Workspaces/CCC/Test/example_app.Test.DataAccessUnitTest/bin/Debug/BouncyCastle.Crypto.DLL.
LOG: Attempting download of new URL file:///C:/Users/example_user/Source/Workspaces/CCC/Test/example_app.Test.DataAccessUnitTest/bin/Debug/BouncyCastle.Crypto/BouncyCastle.Crypto.DLL.
LOG: Attempting download of new URL file:///C:/Users/example_user/Source/Workspaces/CCC/Test/example_app.Test.DataAccessUnitTest/bin/Debug/BouncyCastle.Crypto.EXE.
LOG: Attempting download of new URL file:///C:/Users/example_user/Source/Workspaces/CCC/Test/example_app.Test.DataAccessUnitTest/bin/Debug/BouncyCastle.Crypto/BouncyCastle.Crypto.EXE.

我不得不使用 .NET 46 解决方案。 Walmart.Sdk.Base 程序集基于 .NET Standard 1.3 构建。 我需要引用 .NET 4.6 的那个。

我的问题是在同一个解决方案中同时构建一个项目,该解决方案通过 NuGet 引用一个较旧的库,有时它会覆盖最新的库。 升级此项目中的 NuGet 包修复了该问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C#:无法加载文件或程序集'OpenPop,Version = 2.0.4.369,Culture = neutral,PublicKeyToken = null'或其依赖项之一 无法加载文件或程序集'XXX,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一 无法加载文件或程序集'Dapper,Version = 1.8.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一 无法加载文件或程序集'System,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 561934e089'或其依赖项之一 无法加载文件或程序集“Microsoft.SqlServer.Types, Version=12.0.0.0, Culture=neutral, PublicKeyToken=myKey”或其依赖项之一。 无法加载文件或程序集'itextsharp,Version = 5.5.0.0,Culture = neutral,PublicKeyToken = 8354ae6d2174ddca'或其依赖项之一 无法加载文件或程序集“Microsoft.Bcl.AsyncInterfaces,Version=1.0.0.0,Culture=neutral,PublicKeyToken=XX”或其依赖项之一 无法加载文件或程序集“工具,版本= 4.5.0.0,区域性=中性,PublicKeyToken = f7660c0f5438cda5”或其依赖项之一 无法加载文件或程序集“系统,版本=4.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089”或其依赖项之一 Nuget -“无法加载文件或程序集'{类名},版本 = xxx,文化 = 中性,PublicKeyToken = null'或其依赖项之一”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM