在此上下文中不支持 nameE 属性

The namE attribute is not supported in this context

虽然我在 Visual Studio 2012 年打开 .EDMX 意味着当我点击它时,它会给我这样的错误:

The namE attribute is not supported in this context.

并且我在其他 application/projects 中也遇到了同样的错误,这只发生在 edmx 文件而不是其他文件上。 谁能给我解决方案?

Solved

我使用的是 EntityFramework 6.0 版本而不是 5.0。

我通过下载 EntityFramework 5.0 的 dll 并在我的项目中删除 EntityFramework 6.0 的引用并再次给它引用 EntityFramework 5.0 dll 来修复它,最后清理并重建已解决的项目我的问题。

不过,如果有人遇到错误,请尝试修复 VisualStudio 并且仍然会通过 运行 设置给您 reinstall/new-install 您的 visual studio 错误。