ADO。NET实体数据模型错误。

时间:2021-01-18 02:13:54

I have a project in visual studio ultimate 2010 (MVVM) and database, in SQLITE.

我有一个项目在visual studio ultimate 2010 (MVVM)和数据库,在SQLITE。

Everything worked fine, but now I have a problem with the ADO.NET Entity Data Model.

一切都很顺利,但现在我有麻烦了。网络实体数据模型。

I searched for information about this and have not found much .. Every time I want to open the wizard, it just closes.

我搜索了有关这方面的资料,但没有找到多少。每次我想打开向导,它就关闭了。

I think I should reinstall Visual Studio, but before doing so if anyone has had this error before and know what can be, I'd be grateful.

我想我应该重新安装Visual Studio,但是在这样做之前,如果有人之前有过这个错误,知道什么是可以做的,我将感激。

7 个解决方案

#1


8  

I've found this can be a bug with third party data adapters being left in strange states. Open your View > Server Explorer and remove your third-party data connections. Then, try opening the wizard again.

我发现这可能是一个bug,因为第三方数据适配器被留在奇怪的状态。打开您的视图>服务器资源管理器并删除您的第三方数据连接。然后,尝试再次打开向导。

#2


3  

I had this problem with VS 2013 (Entity Model Wizard disappearing). I solved it by first uninstalling the MySQL .NET/Connector (I had 6.8.3) and installing it back, and then retrying the wizard. Wizard completes and I could select tables etc.

我遇到了VS 2013(实体模型向导正在消失)的问题。我首先卸载了MySQL . net / connector(我有6.8.3),然后重新安装它,然后重新尝试向导。向导完成,我可以选择表格等等。

#3


0  

Try deleting the following file

尝试删除以下文件。

c:\users\myusername\appdata\roaming\microsoft\visualstudio\10.0\SeverExplorer\DefaultView.SEView.

c:\ \ appdata \漫游\上的用户名都用户\ dangillmor微软\ visualstudio \ 10.0 \ SeverExplorer \ DefaultView.SEView。

#4


0  

If you are creating a web application such as through MVC check the AttachDBFilename in web.config for characters such as |.

如果您正在创建一个web应用程序,比如通过MVC检查web中的AttachDBFilename。配置字符,如|。

I had the same issue and was unable to resolve it by removing connections from Server Explorer.

我有同样的问题,无法通过删除服务器资源管理器的连接来解决它。

I attached a visual studio debugger to visual studios.

我将一个visual studio调试器附加到visual studio中。

Turned on CLI exceptions and turned off Just my Code.

打开CLI异常并关闭我的代码。

I then saw the hidden exception.

然后我看到了隐藏的异常。

The wizard was throwing an exception with the message "Invalid Character in Path" in System.IO.Path.CheckInvalidPathChars(string path, bool checkAdditional).

向导在system . i .Path中向“Path中的无效字符”发送了一个异常。bool checkAdditional CheckInvalidPathChars(字符串路径)。

The value of path was "|DataDirectory|\\aspnet-Mvs4Dummy1-20140402113853.mdf".

path的价值是“|DataDirectory|\\aspnet- mvs4dummy1 - 201402113853.mdf”。

I realised that this was the database that visual studios had automatically generated with my MVC application and that the offending character was probably the '|' symbol.

我意识到,这是visual studio自动生成的数据库,而我的MVC应用程序,这个讨厌的字符可能是“|”的符号。

So I performed a Grep search of my directory and found that this was being stored in my web.config in this apparently unsupported format.

因此,我对我的目录进行了Grep搜索,发现它被存储在我的web中。这显然是不支持的格式。

I changed the entry to a full local path and the wizard stopped disappearing.

我将条目改为一个完整的本地路径,向导停止了消失。

#5


0  

Open VS, View->Server Explorer and delete connections under the data connection files. I had already this error before and solve it doing like this.

打开VS,查看->服务器资源管理器并删除数据连接文件下的连接。之前我已经做过这个错误了。

#6


0  

My solution for VS2015 was:

我对VS2015的解决方案是:

Install MySQL.NET Connector 6.9.8 to replace 6.9.5.

安装MySQL。NET连接器6.9.8替代6.9.5。

I already has installed MySQL for Visual Studio 1.2.6 and had got the appropratiate MySQL NuGet packages (MySQL.Data, MySQL.Data.Entity.EF6, MySQL.Web).

我已经为Visual Studio 1.2.6安装了MySQL,并且已经得到了appropratiate MySQL NuGet软件包(MySQL)。数据,MySQL.Data.Entity。EF6 MySQL.Web)。

#7


0  

I solved the problem by doing some steps below: 1/ Open "Server Explorer" window in Visual Studio 2/ Delete all Connections under "Data Connections" sections 3/ Then, Add the ADO.net Entity Data Model as normal

我通过以下步骤解决了这个问题:在Visual Studio 2中打开“Server Explorer”窗口,在“数据连接”第3节中删除所有连接,然后将ADO.net实体数据模型添加为正常。

#1


8  

I've found this can be a bug with third party data adapters being left in strange states. Open your View > Server Explorer and remove your third-party data connections. Then, try opening the wizard again.

我发现这可能是一个bug,因为第三方数据适配器被留在奇怪的状态。打开您的视图>服务器资源管理器并删除您的第三方数据连接。然后,尝试再次打开向导。

#2


3  

I had this problem with VS 2013 (Entity Model Wizard disappearing). I solved it by first uninstalling the MySQL .NET/Connector (I had 6.8.3) and installing it back, and then retrying the wizard. Wizard completes and I could select tables etc.

我遇到了VS 2013(实体模型向导正在消失)的问题。我首先卸载了MySQL . net / connector(我有6.8.3),然后重新安装它,然后重新尝试向导。向导完成,我可以选择表格等等。

#3


0  

Try deleting the following file

尝试删除以下文件。

c:\users\myusername\appdata\roaming\microsoft\visualstudio\10.0\SeverExplorer\DefaultView.SEView.

c:\ \ appdata \漫游\上的用户名都用户\ dangillmor微软\ visualstudio \ 10.0 \ SeverExplorer \ DefaultView.SEView。

#4


0  

If you are creating a web application such as through MVC check the AttachDBFilename in web.config for characters such as |.

如果您正在创建一个web应用程序,比如通过MVC检查web中的AttachDBFilename。配置字符,如|。

I had the same issue and was unable to resolve it by removing connections from Server Explorer.

我有同样的问题,无法通过删除服务器资源管理器的连接来解决它。

I attached a visual studio debugger to visual studios.

我将一个visual studio调试器附加到visual studio中。

Turned on CLI exceptions and turned off Just my Code.

打开CLI异常并关闭我的代码。

I then saw the hidden exception.

然后我看到了隐藏的异常。

The wizard was throwing an exception with the message "Invalid Character in Path" in System.IO.Path.CheckInvalidPathChars(string path, bool checkAdditional).

向导在system . i .Path中向“Path中的无效字符”发送了一个异常。bool checkAdditional CheckInvalidPathChars(字符串路径)。

The value of path was "|DataDirectory|\\aspnet-Mvs4Dummy1-20140402113853.mdf".

path的价值是“|DataDirectory|\\aspnet- mvs4dummy1 - 201402113853.mdf”。

I realised that this was the database that visual studios had automatically generated with my MVC application and that the offending character was probably the '|' symbol.

我意识到,这是visual studio自动生成的数据库,而我的MVC应用程序,这个讨厌的字符可能是“|”的符号。

So I performed a Grep search of my directory and found that this was being stored in my web.config in this apparently unsupported format.

因此,我对我的目录进行了Grep搜索,发现它被存储在我的web中。这显然是不支持的格式。

I changed the entry to a full local path and the wizard stopped disappearing.

我将条目改为一个完整的本地路径,向导停止了消失。

#5


0  

Open VS, View->Server Explorer and delete connections under the data connection files. I had already this error before and solve it doing like this.

打开VS,查看->服务器资源管理器并删除数据连接文件下的连接。之前我已经做过这个错误了。

#6


0  

My solution for VS2015 was:

我对VS2015的解决方案是:

Install MySQL.NET Connector 6.9.8 to replace 6.9.5.

安装MySQL。NET连接器6.9.8替代6.9.5。

I already has installed MySQL for Visual Studio 1.2.6 and had got the appropratiate MySQL NuGet packages (MySQL.Data, MySQL.Data.Entity.EF6, MySQL.Web).

我已经为Visual Studio 1.2.6安装了MySQL,并且已经得到了appropratiate MySQL NuGet软件包(MySQL)。数据,MySQL.Data.Entity。EF6 MySQL.Web)。

#7


0  

I solved the problem by doing some steps below: 1/ Open "Server Explorer" window in Visual Studio 2/ Delete all Connections under "Data Connections" sections 3/ Then, Add the ADO.net Entity Data Model as normal

我通过以下步骤解决了这个问题:在Visual Studio 2中打开“Server Explorer”窗口,在“数据连接”第3节中删除所有连接,然后将ADO.net实体数据模型添加为正常。