错误一般是
System.IO.FileLoadException: Could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=3.1.1.0, Culture=neutral, PublicKeyToken=xx'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'Microsoft.EntityFrameworkCore, Version=3.1.1.0, Culture=neutral, PublicKeyToken=xxx'
在.csproj文件里找到这个,把Version 改成指定版本就行。
在build的时候会提示版本不一致,不知道改啥版本就看提示