Visual Studio 2019 failing to create ADO.NET Entity Data Model

Viewed 210

I have run into a brick wall and have NO idea what else to try.

I had VS 16.11.2 community edition installed when all of a sudden when I tried to add a ADO.NET Entity Data Model it started failing. It connects to the database and starts OK, but right after the message below it then throws as error:

Generated model file: Model2.edmx.
Loading metadata from the database took 00:00:00.8853433/
Generating the model took 00:00:14.7494432.
Added the connection string to the App.Config file.
Writing the .edmx file took 00:00:00.0010011.

At that point it throws a 'Object reference not set to an instance of an object' error box. The data context does not work, it is seen but the fields are not created correctly. Meaning the following should allow me to access the fields from the table but does not show up. first image of missing fields

If I just type in the field it also does not work: image two of no intelisense

  • I have done a FULL uninstall and fresh install of version 16.11.5
  • I have switched from .net 4.8 to 4.7
  • I have tried a different database (just in case)
  • Fresh project/solution

What else can I do??

UPDATE: Also tried installing VS into a different drive/folder (clean install)

IMPORTANT FINDING: It works if I use a normal console project template. It does NOT work using the Webjob .NET template.

Update Further on 11-9: This seems to be a widespread issue. Using a 100% fresh VS install against a completely new Azure database server AND new table the exact same thing happens.

Update 11/11/21: Working with Microsoft Support and will update with what we find.

Found this link: https://github.com/dotnet/ef6/issues/1701 Installed VS 2017 and verified that it works OK with 2017.

error message

0 Answers
Related