0
votes

How can I fix deployment problem? upgraded entity framework core from 3.1.4 to 3.1.5. Result mvc core web app runs in VS, but fails in Azure.

Dot Net core 3.1 with EF 3.1.4 in Azure ran OK.

I updated the Nuget EF packages to current stable 3.1.5, and the result runs locally, but fails when deployed to Azure with message: "could not load file or assembly 'Microsoft.EntityFrameworkCore, Version=3.1.5.0"

I used the Azure AppService Console and can see the EF versions have the same date as my local files "5/1/2020".

The FileExplorer details screen shows the version as 3.1.5, while the error message says it can not load 3.1.5.0. I searched, but did not find any other people with this problem.

2

2 Answers

0
votes

I think is missing the reference there. If you can, check in the folder "packages" if there is a EF 3.1.5 there. Also, check if there is some places which is showing just 3.1.5.0 and try to change to 3.1.5 as is showing in the nuget library.

0
votes

Finally solved the problem. It involved information from this Microsoft article: https://docs.microsoft.com/en-us/aspnet/core/test/troubleshoot-azure-iis?view=aspnetcore-3.1#clear-package-caches

  • Needed to uninstall some nuget packages, use command line nuget commands to clear nuget cache, and then re-install latest nuget packages. Redeployed to Azure and the site works again.