Nick Reeve
Nick Reeve

Reputation: 1680

Visual Studio 2022 Cannot Update EDMX Entity Model from Database

All of a sudden I cannot update the .edmx files I have in all of my projects in Visual Studio 2022. This is something I have done tons of times on various projects for years: open the .edmx, right click empty space, "Update Model from Database".

Now it brings up a dialog for choosing my data connection (the connection strings are already in the config files and have been for years). Then the dialog just closes with no errors at all. Happens for all projects and don't know where to go from here?

Upvotes: 11

Views: 8737

Answers (5)

James Selleck
James Selleck

Reputation: 309

If you have already checked that you have the right version of VS2022, then you need to resolve any compilation issues in the project, then close Visual Studio and re-open it. I just had the same problem (second time)... I can't recall where I read this advice, but it worked for me.

Upvotes: 0

An Khang
An Khang

Reputation: 259

Microsoft has fixed this issue in the 17.5.5 version. I update mine and it worked! Hope this will help.

Upvotes: 1

Nikolay Kostov
Nikolay Kostov

Reputation: 16983

The good old solution to delete the .edmx file and then recreate it worked for me.

Upvotes: 0

Scott Munro
Scott Munro

Reputation: 13596

I was having the same problem but things returned to normal after I upgraded to Visual Studio 2022 version 17.5.3.

Upvotes: 1

Nelson Filipe
Nelson Filipe

Reputation: 61

I just experienced the same issue with Visual Studio 2022, and upon further investigation, I discovered that there are issues with VS2022 and .edmx from version 17.4 onwards.

Nevertheless, it appears that the development team behind VS2022 is already aware of this issue and is expected to release a new version that addresses it. However, I was able to "fix" it temporarily by following the workaround mentioned in the link, which involved removing “MultipleActiveResultSets=True;” from the connection string in the app.config.

Upvotes: 6

Related Questions