I am trying to create EDM using Entity Framework's database-first workflow designer. It fails right after starting running with error message
Object reference not set to an instance of an object
However it creates an .edmx
model with just 2 files instead of 4: [name].Designer.cs
and [name].edmx.diagram
. And those 2 files are missing: [name].Context.tt
, [name].tt
.
I have the latest version of VS (16.10.0) and EF (6.4.4) and store the DB on localhost, however tried to create EDM using different older versions of VS and EF and got the same result. Could I ask you for tip about what is wrong with what I do?
Thanks in advance
P.S. BTW [name].Designer.cs
file contains errors related to a missing references of:
In other words those references just cannot be added for some reason.
UPD. Tried to do the same on another machine with other older version of VS and different versions of EF and the result is the same. And in that case DB was not stored locally.
If there are some inconsistencies between types of project containing Entity Relationship Data Model (.edmx item) and target project, it could cause such illogical error as one mentioned above. So it is always better to check out, whether ERDM containing project and target project do link to the same version of .NET Framework, respectively .NET Core.