Visual Studio 2022 无法从数据库更新 EDMX 实体模型。

huangapple go评论115阅读模式
英文:

Visual Studio 2022 Cannot Update EDMX Entity Model from Database

问题

我无法更新我在Visual Studio 2022中的所有项目中拥有的.edmx文件。这是多年来我在各种项目上已经做过无数次的事情:打开.edmx,右键单击空白处,选择“从数据库更新模型”。

现在它会弹出一个对话框,让我选择我的数据连接(连接字符串已经在配置文件中并且已经存在多年)。然后对话框只是关闭,没有任何错误信息。对所有项目都发生,不知道该怎么办了?

英文:

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?

答案1

得分: 5

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.

英文:

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.

答案2

得分: 1

问题解决后,我升级到了Visual Studio 2022版本17.5.3。

英文:

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

答案3

得分: 1

Microsoft已在17.5.5版本中修复了此问题。我升级了我的版本,问题得以解决!希望这对你有帮助。

英文:

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

答案4

得分: 0

删除.edmx文件然后重新创建它的解决方案对我有效。

英文:

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

答案5

得分: 0

如果您已经检查过您是否有正确版本的VS2022,那么您需要解决项目中的任何编译问题,然后关闭Visual Studio并重新打开它。
我刚刚遇到了相同的问题(第二次)...我不记得在哪里读到这个建议,但它对我起作用。

英文:

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.

huangapple
  • 本文由 发表于 2023年3月7日 03:36:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/75655109.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定