简体   繁体   English

ASP.NET 核心 MVC:定位的程序集的清单定义与程序集引用不匹配

[英]ASP.NET Core MVC: The located assembly's manifest definition does not match the assembly reference

I tried to deploy my Asp.net core mvc projekt to our server, but the ISS only logs this error我尝试将我的 Asp.net 核心 mvc 项目部署到我们的服务器,但 ISS 仅记录此错误

System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'Microsoft.Extensions.DependencyInjection.Abstractions, Version=5.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'

It does work localy, but not on the server.它可以在本地工作,但不能在服务器上工作。

I found this Could not load file or assembly Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0 thread about the problem, but the accepted answer is for the .net Framework, not .net core (and did not work, I did try it) and the later answers are about Azure functions which I dont use.我发现这可能无法加载文件或程序集 Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.1.0.0线程关于该问题,但接受的答案是针对 .net 框架,而不是 .net 核心(并没有工作,我试过了) 后面的答案是关于我不使用的 Azure 函数。

I use net core 3.1我使用网络核心 3.1

So, this was probably a noob mistake: I use Core 3.1 but NuGet added the references for 5.0所以,这可能是一个菜鸟错误:我使用 Core 3.1 但 NuGet 添加了 5.0 的参考

<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="5.0.0.0" />

After downgrading to the 3.1.14 Version, everything降级到3.1.14版本后,一切

    <PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="3.1.14" />

暂无
暂无

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

相关问题 NET CORE 5. 如何修复“找到的程序集的清单定义与程序集引用不匹配”? - NET CORE 5. How to fix "The located assembly's manifest definition does not match the assembly reference"? 找到的程序集的清单定义与程序集引用不匹配 - The located assembly's manifest definition does not match the assembly reference “定位的程序集的清单定义与程序集引用不匹配” - “The located assembly's manifest definition does not match the assembly reference” EF Core 迁移错误,定位程序集的清单定义与程序集引用不匹配 - EF Core migration errors with the located assembly's manifest definition does not match the assembly reference MVC4:程序集的清单定义与程序集引用不匹配 - MVC4: Assembly's manifest definition does not match the assembly reference .NET Standard:程序集的清单定义与程序集引用不匹配 - .NET Standard: assembly's manifest definition does not match assembly reference Windows Universal App:无法加载文件或程序集-找到的程序集的清单定义与程序集引用不匹配 - Windows Universal App: Could not load file or assembly - The located assembly's manifest definition does not match the assembly reference 无法加载文件或程序集。 定位的程序集的清单定义与程序集引用不匹配 - Could not load file or assembly. The located assembly's manifest definition does not match the assembly reference 两个不同的汇编版本“找到的汇编的清单定义与汇编参考不匹配” - Two different assembly versions “The located assembly's manifest definition does not match the assembly reference” 无法加载文件或程序集:找到的程序集的清单定义与程序集引用不匹配 - Could not load file or assembly: The located assembly's manifest definition does not match the assembly reference
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM