none
EntityFramework stopped working! Please Help! RRS feed

  • Question

  • Hi,

    I have been doing some learning with using EF4.1.0.0 and I have been using Add New Item to my MVC3 project to add the entities from my database. I can select ADO.NET Entity Data Model and then I get the wizard dialog for "Choose Model Contents". When I select "Generate from database" and press Next sometimes the next dialog to pick your connection comes up, sometimes not - but in either case the dialog disappears and there is no more to do. I tried exiting VS2010 Ultimate and starting over with a new project. Same problem. I tried rebooting my pc and same problem.

    Everything was working fine until selected an Oracle database (which I had been doing just fine earlier) and VS2010 blew up... BAM!!! I really hoped that the 20 minutes to reboot my machine would solve the problem, but no...

    Do I need to reinstall something? Or is there some kind of VS2010 reset? Bummer.

    Any suggestions would be appreciated.

    regards,

    Bill44077


    William Campbell
    Monday, February 6, 2012 6:21 PM

All replies

  • Hi William,

    Welcome!

    According to your description, Entity Framework just doesn't work for Oracle database, right? I think you should install related Data Provider: http://msdn.microsoft.com/en-us/data/dd363565.aspx

    This blog is help: http://blogs.msdn.com/b/adonet/archive/2011/02/22/oracle-releases-beta-of-entity-framework-provider.aspx

    BTW, you should post your question here: https://forums.oracle.com/forums/forum.jspa?forumID=146, thanks for understanding.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 7, 2012 7:20 AM
    Moderator
  • Hi Alan,

    Thanks for the quick reply but No, that is not at all what I am saying. It was working just fine with the Oracle ODAC provider that has been designed to work with EF as well as working with SQL Server. It was working just fine and then something happened and now EF is blowing up on the second screen of the wizard where you specify the connection. This is BEFORE I even get to tell it which db connection to use. You think this is an Oracle Data Provider issue? This connection dialog is where you specify SQL, or Oracle or whichever db you will want to create a connection to.

    I CANNOT create a EF Model using ANY database (SQL, Oracle, etc). Any ideas on how I can keep EF from blowing up? Reinstall? I hope that someone here can help with EF. I'm just not sure what to try.

    thanks,

    Bill44077


    William Campbell



    • Edited by Bill44077 Tuesday, February 7, 2012 12:24 PM
    Tuesday, February 7, 2012 12:17 PM
  • Hi,

    Since I've gotten no answers I tried unistalling EF and reinstalling. It didn't help the problem. I am now in the process of Uninstalling VS2010 Ultimate and Reinstalling from scratch. And, oh yeah, reinstalling SP1 (which doesn't include the Silverlight msi ) so I've spent multiple hours trying to figure out how to get the msi. Why doesn't MS make this available somewhere for download? Rats! Not a happy camper. I'll report if this whole process fixes the EF issue that I am having. There probably is a much more simple solution to this problem but unfortunately since I mentioned Oracle, no one wants to help me. Unfortunate. EF isn't working with SQL either.

    so sad!

    Bill44077


    William Campbell

    Wednesday, February 8, 2012 3:39 PM
  • Hi Bill44077,

    I'm sorry for late. According to your post, You have installed EF4.1 on your computer, right? If you're doing Database first there is no need to install EF4.1. I think you can try to uninstall EF4.1. I'm not sure if you have installed "June 2011 CTP", if yes, you should uninstall it and refer "Readme" here: http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26660

    -------------

    We recommend installing the Microsoft Entity Framework and SQL Server Tools  for Data Framework June 2011 CTP in a non-production environment to avoid any  risk associated with installing and uninstalling pre-release software.

    If the SQL Server Tools for Data Framework CTP is uninstalled,  existing functionality installed with Visual Studio 2010 (such as the Entity  Designer) will no longer be available.

    Solution:

    -------------

    BTW, If it doesn't work, would you please share your screen shots with me, thanks for understanding.

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Thursday, February 9, 2012 6:54 AM
    Moderator
  • Hi Alan,

    I posted a question to the Oracle site and got this response:

    "I have reproduced the crash and found a solution. We believe its due to a quirk in how Visual Studio handles existing Server Explorer DB connections.

    The EDM wizard accesses the existing Server Explorer connectiions in the screen that crashes. If the very first connection listed is unable to connect, whether it's connecting to Oracle, SQL Server, etc., then the wizard will crash.

    If you fix the problem with the first connection (or delete the first connection assuming the second connection works), then you will be able to continue on in the wizard.

    In my case, I was able to reproduce this when my first connection in Server Explorer was a schema user whose password had expired. I assigned a new password and the wizard did not crash when I used the EDM wizard again.

    The first Server Explorer connection doesn't even have to be to Oracle. It could be to SQL Server or another DB."

    It appears that this has nothing to do with the database being Oracle or anything else. Is this bug reported to MS? Is there a fix available?

    thanks,

    Bill


    William Campbell

    Friday, February 10, 2012 6:59 PM
  • Hi,

    Any feedback from anyone at Microsoft? This is a pretty significant issue.

    thanks,

    Bill


    William Campbell

    Monday, February 13, 2012 2:10 PM
  • Hi Bill44077,

    Thanks for your feedback!

    But I couldn't repro the scenario with the first unable connection in my wizard, it works on my computer!

    The first connectionstring is unable!

    My second connection string works:

    Have a nice day.


    Alan Chen[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, February 14, 2012 9:01 AM
    Moderator
  • Hi Alan,

    Interesting. I couldn't even get to the "Which data connection should your application use..." dialog. It disappears before any selection is able to be made (i.e. the First connection in the list is not valid, or has a red x on it in the Server Explorer.). It appears that many others have gotten this same error and the only way to work around it is to remove the broken connections from the Server Explorer. I'm not sure how you got a broken connection vs how it happened for me or if that is the difference why yours works and mine doesn't. I didn't see a screenshot of your Server Explorer where the first connection is broken with a red x.

    Now it appears that I have a work around if removing the broken connections from the Server Explorer lets me select a valid connection in the EDM wizard. I'm also not sure if the drop down selection list that you show in your screenshot is the same order as the Server Explorer list order. Maybe it is?

    Thanks for taking the time to try to help with this. I'm still thinking there is a bug in here. :)

    regards,

    Bill44077


    William Campbell

    Tuesday, February 14, 2012 12:02 PM
  • Hi Bill44077,

    I resolved my issue by deleting problematic connection from Server explorer as you have mentioned. Thanks for the solution.

    Seems there is a bug in VS 2010.

    Thanks

    Yadnesh

    Tuesday, July 31, 2012 9:13 AM