Ubuntu 上的 ASP.NET 找不到库

问题描述 投票:0回答:1

我正在尝试运行一个使用 EF 的项目,但出现了投诉

dotnet
:

Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
      An unhandled exception has occurred while executing the request.
      System.IO.FileNotFoundException: Could not load file or assembly '**Microsoft.EntityFrameworkCore.Relational**, Version=8.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
      File name: 'Microsoft.EntityFrameworkCore.Relational, Version=8.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60

但是,Microsoft.EntityFrameworkCore.Relational.dll 与项目的 DLL 位于同一文件夹中。怎么会‘找不到指定的文件’?

asp.net-core razor-pages ubuntu-20.04
1个回答
0
投票

解决方案如下:删除 bin 和 obj 文件夹,重建整个项目,然后再次部署。现在它可以工作了..奇怪.

© www.soinside.com 2019 - 2024. All rights reserved.