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.

YellowBrickRoad
  • 81
  • 2
  • 10
  • 2
    Go to the Windows Event log and see why it's crashing. – evanmcdonnal Jun 03 '13 at 16:44
  • Or listen to this brilliant answers and just start deleting files without knowing what they do... – evanmcdonnal Jun 03 '13 at 16:48
  • 2
    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. – George Johnston Jun 03 '13 at 16:51
  • @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! – YellowBrickRoad Jun 03 '13 at 18:07
  • @wpfc I re-added my answer below as it solved your problem. Thanks,George – George Johnston Jun 03 '13 at 18:37

7 Answers7

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.

George Johnston
  • 31,652
  • 27
  • 127
  • 172
  • 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! – YellowBrickRoad Jun 03 '13 at 18:59
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.

chiefcoder
  • 41
  • 1
0

Try deleting the following file

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

Kurubaran
  • 8,696
  • 5
  • 43
  • 65
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.

Gwenc37
  • 2,064
  • 7
  • 18
  • 22
Rob Powell
  • 1,367
  • 2
  • 13
  • 10
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.

Taha Karaca
  • 111
  • 1
  • 1
  • 10
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).

John M
  • 14,338
  • 29
  • 91
  • 143
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

Loc Huynh
  • 286
  • 3
  • 3