首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >无法加载文件或程序集“BouncyCastle.Crypto,Version=1.8.1.0,Culture=neutral,PublicKeyToken=null”或其依赖项之一

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

Stack Overflow用户
提问于 2018-06-05 02:54:23
回答 2查看 12.2K关注 0票数 5

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

软件开发工具包使用.NET标准1.3,并引用BouncyCastle.Crypto 1.8.1.3:

https://github.com/walmartlabs/partnerapi_sdk_dotnet

1.8.1.3不适用于.NET 4.61。

代码语言:javascript
复制
{"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.
EN

回答 2

Stack Overflow用户

发布于 2018-06-05 06:14:58

我不得不使用.NET 46解决方案。Walmart.Sdk.Base程序集基于.NET标准1.3构建。我需要参考.NET 4.6的版本。

票数 2
EN

Stack Overflow用户

发布于 2020-10-23 20:46:14

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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50687051

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档