Test error :Could not load file or assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral
Test error :Could not load file or assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral
我安装了 ASP.NET Boilerplate 的免费启动模板,其架构 Asp.Net Mvc5.x 和单页 Web 应用程序 Angular JS
并且当我 运行 已经添加到模板的测试作为示例时,它被称为 Should_Get_Current_User_And_Tenant_When_Logged_In_As_Tenant() 在项目中找到
SpecificDownloadedProjectName.Tests
我收到错误
Could not load file or assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
我当前的 castle.core 版本是 v4.3.1
和 Abp 3.8.3
这些版本是 NuGet 包中最新的可用版本
我尝试通过 NuGet 包管理器将 Castle.core 更新为 4.0.0,因为异常消息提到了,但我无法解决以下错误
Severity Code Description Project File Line Suppression State
Error Unable to resolve dependencies. 'Castle.Core 4.0.0' is not compatible with 'Abp 3.8.3 constraint: Castle.Core (>= 4.3.1)', 'Castle.Core-log4net 4.3.1 constraint: Castle.Core (= 4.3.1)', 'Castle.DynamicProxy 2.2.0 constraint: Castle.Core (= 1.2.0)'. 0
我应该怎么做才能解决这个异常
这是 Nuget 的问题,有时无法解决,因此您必须在 web.config 或 app.config 中手动添加以下行。您还必须确保行的顺序。
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.0.0.0" />
</dependentAssembly>
注意:您可以根据需要设置oldVersion和newVersion值。
我安装了 ASP.NET Boilerplate 的免费启动模板,其架构 Asp.Net Mvc5.x 和单页 Web 应用程序 Angular JS
并且当我 运行 已经添加到模板的测试作为示例时,它被称为 Should_Get_Current_User_And_Tenant_When_Logged_In_As_Tenant() 在项目中找到 SpecificDownloadedProjectName.Tests
我收到错误
Could not load file or assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
我当前的 castle.core 版本是 v4.3.1
和 Abp 3.8.3
这些版本是 NuGet 包中最新的可用版本
我尝试通过 NuGet 包管理器将 Castle.core 更新为 4.0.0,因为异常消息提到了,但我无法解决以下错误
Severity Code Description Project File Line Suppression State
Error Unable to resolve dependencies. 'Castle.Core 4.0.0' is not compatible with 'Abp 3.8.3 constraint: Castle.Core (>= 4.3.1)', 'Castle.Core-log4net 4.3.1 constraint: Castle.Core (= 4.3.1)', 'Castle.DynamicProxy 2.2.0 constraint: Castle.Core (= 1.2.0)'. 0
我应该怎么做才能解决这个异常
这是 Nuget 的问题,有时无法解决,因此您必须在 web.config 或 app.config 中手动添加以下行。您还必须确保行的顺序。
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.0.0.0" />
</dependentAssembly>
注意:您可以根据需要设置oldVersion和newVersion值。