ASP.NET on Ubuntu not finding library

40 views Asked by At

I'm trying to run a project that uses EF, but a complaint arises from 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

However, Microsoft.EntityFrameworkCore.Relational.dll is right there in the same folder as the DLL of the project. How can it 'not find the file specified'?

1

There are 1 answers

2
Andy On

Here's the solution: delete bin and obj folders, rebuild the whole project, and deploy again. Now it works.. weird.