解决问题“Could not load file or assembly xxxxxxx or one of its dependencies”

2022-08-01,,,

在开发.NET web项目时,本地运行没有问题,但在publish的时候出现了错误:

Could not load file or assembly 'xxxxxxxxxxxx' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.

问题在于Visual Studio在处理依赖的时候出现了一些异常。此时应重新安装该依赖。

解决方案:

1. Tools -> NuGet Package Manager -> Package Manager Console

2. 在控制台输入:Update-Package -Id <package_name> –reinstall。用出现问题的依赖名字代替<package_name>。

3. 重新publish,如果其他依赖再次出现这个问题,重复以上步骤。

 

本文地址:https://blog.csdn.net/biatbang/article/details/107527645

《解决问题“Could not load file or assembly xxxxxxx or one of its dependencies”.doc》

下载本文的Word格式文档,以方便收藏与打印。