简体   繁体   中英

Could not load file or assembly. The located assembly's manifest definition does not match the assembly reference. Version conflict

I am having an error when I want to run my program. The error states that it could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference.

I have checked on my target framework and package reference which I am now using.net5.0 framework for my project. But the version of System.Runtime seems to be.net6.0 framework. I have checked on my System.Runtime that the version is 5.0.0.0. So obviously the version 6.0.0.0 is missing. Does anyone know how to change the version of System.Runtime to be 5.0.0.0?

Error Message在此处输入图像描述

System Runtime DetailsSystem.Runtime 详细信息

.csproj file 代码页

Okay, so i just delete my bin and obj folder and proceed to clean and rebuild my project and it works perfectly. Wasted two days for this.

Got the inspiration from this link. Credit to Levi Fuller's comment

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question Could not load file or assembly. The located assembly's manifest definition does not match the assembly reference 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 Could not load file or assembly 'MySql.Data, Version=8.0.29.0.. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly 'WebGrease' one of its dependencies. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly or one of its dependencies. The located assembly's manifest definition does not match the assembly reference Could not load file or assembly XXX or one of its dependencies. The located assembly's manifest definition does not match the assembly reference The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040 The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) How to resolve "The located assembly's manifest definition does not match the assembly reference." error?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM