简体   繁体   中英

ADO.NET Entity Data Model BUG

I have a project in visual studio ultimate 2010 (MVVM) and database, in 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.

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.

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.

Try deleting the following file

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

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

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.

Turned on CLI exceptions and turned off Just my Code.

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).

The value of path was "|DataDirectory|\\\\aspnet-Mvs4Dummy1-20140402113853.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.

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.

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

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.

My solution for VS2015 was:

Install MySQL.NET Connector 6.9.8 to replace 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).

我通过以下步骤解决了这个问题:1 /在Visual Studio 2中打开“服务器资源管理器”窗口/删除“数据连接”部分下的所有连接3 /然后,正常添加ADO.net实体数据模型

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM