Closed robertmclaws closed 3 weeks ago
@ajcvickers @ErikEJ tagging you both since this is a "broken in Production" situation.
Updated with a verified workaround.
@robertmclaws I created a PR with a fix...
Fixed in ac4a11e
Thanks everyone for getting this fixed so quickly!
wonder if issues with the NuGet package (the unrecognized framework shown in 1st screenshot) could be caught automatically via some test case
The NuGet package is just a zip file, so there absolutely could be a smoke test to enumerate through the file and make sure the structure is the way it is supposed to be.
Sounds like something I could add to Breakdance.
Adding any sort of automated testing is out of scope for EF 6.x And we use a very different release process for EF Core
Adding any sort of automated testing is out of scope for EF 6.x And we use a very different release process for EF Core
I mean, if someone contributes a fix to make sure people's builds don't randomly break again, are you going to reject it? This took significant time and expense out of my weekend to triage and fix... I would prefer to not have that happen again.
Adding any sort of automated testing is out of scope for EF 6.x And we use a very different release process for EF Core
I mean, if someone contributes a fix to make sure people's builds don't randomly break again, are you going to reject it? This took significant time and expense out of my weekend to triage and fix... I would prefer to not have that happen again.
We might, since code reviews can take a non-trivial amount of time and the chance of hitting the same kind of packaging issue isn't high. Also, any new dependency would be unacceptable.
RTM PACKAGE FAILURE
There is an error in the package for 6.5.0 that has broken the EF build process in Visual Studio. The package is not being built properly, therefore
EntityDeploy
is no longer being called to compile EDMX files into the project.ππ» For people experiencing this issue, there is a temporary workaround, see below. ππ»
SYMPTOMS:
You will suddenly get a "Metadata cannot be loaded" error in any project that leverages the
DbContext
, where the code previously functioned normally.IMPACT
Automated builds that were previously working are now failing. I spent several hours tracking down why my services suddenly stopped working.
NEEDED RESOLUTION
EVIDENCE
New EntityFramework 6.5.0 RTM vs EntityFramework 6.4.4 RTM packages:
WORKAROUND
In the project with your EDMX file, replace your
<PackageReference Include="EntityFramework" ... />
line with the following entries:This will tell the build process to use the
EntityCompile
tasks from the EF 6.4.4 package, but NOT to reference anything in thelib
folder for compilation. That means the downstream reference toEntityFramework
6.5 from theMicrosoft.EntityFramework.SqlServer
package will still get compiled into the build and your code will work correctly. The "NoWarn" attribute will tell the build process not to complain that you're referencing a version that the.SqlServer
package doesn't like.