ADO.NET Entity Data Model BUG
Asked Answered
A

7

6

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.

Asafoetida answered 3/6, 2013 at 16:43 Comment(5)
Go to the Windows Event log and see why it's crashing.Cathode
Or listen to this brilliant answers and just start deleting files without knowing what they do...Cathode
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.Cletus
@GeorgeJohnston I did what you told me, then try to modify the connection and I got this error: An exception occurred in the type initializer for 'System.Data.SQLite.SQLiteFactory'... Then I reinstall System.Data.SQLite and the problem was solved. Thank you very much!Asafoetida
@wpfc I re-added my answer below as it solved your problem. Thanks,GeorgeCletus
C
12

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.

Cletus answered 3/6, 2013 at 16:46 Comment(1)
I did what you told me, then try to modify the connection and I got this error: An exception occurred in the type initializer for 'System.Data.SQLite.SQLiteFactory'... Then I reinstall System.Data.SQLite and the problem was solved. Thank you very much!Asafoetida
G
4

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.

Goat answered 7/1, 2014 at 19:47 Comment(0)
T
0

Try deleting the following file

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

Trim answered 3/6, 2013 at 16:45 Comment(0)
S
0

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.

Shaun answered 1/5, 2014 at 9:56 Comment(0)
A
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.

Albedo answered 8/7, 2015 at 20:32 Comment(0)
B
0

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

Beltz answered 6/6, 2016 at 18:50 Comment(0)
M
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

Megohm answered 5/7, 2017 at 21:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.