I have an ASP.net core web app which references a DLL called BLL, which in turn references a DLL called DAL, and within the DAL there is a reference to Microsoft.EntityFrameworkCore 7.0.2.
I have changed the .net versions of these 3 projects from 6 to 7 today, it all compiles and runs fine locally in Visual Studio.
However when I come to deploy it the BLL won't compile, I get an error:
Error CS1705 Assembly 'ST.CMS.DAL' with identity 'ST.CMS.DAL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.EntityFrameworkCore, Version=7.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.EntityFrameworkCore' with identity 'Microsoft.EntityFrameworkCore, Version=6.0.2.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' ST.CMS.BLL C:\Users******\ST.CMS\ST.CMS.BLL\CSC 1 Active
So there is a conflict between 6.0.2 and 7.0.2 for EntityFrameworkCore, however i'm not using 6.0.2 anywhere, I can't understand where it's getting 6.0.2 from.
Before I did this change today it deployed fine. I have tried closing and reopening Visual Studio and rebooting the laptop but it still keeps happening.
Simply removing the Nuget package references to Entity framework core in the DAL project then re-adding them solved the problem.