an System.Runtime.InteropServices.COMException error when trying to create a Entity Data Model
as the title says , i am trying to add a data sour开发者_开发百科ce and when i select the "Entity Data Model " and click next i get a pop-up that says
"an exception of type System.Runtime.InteropServices.COMException occured while attemption to launch Entity Data Model Wizard . The exception message is : Error HRESULT E_FAIL has been returned from a call to a COM component "
Is there a work-around or a solution to fix this problem ?
Crummy error code, it doesn't mean anything more than "it didn't work, don't know why". Focus on getting your machine stable again and reinstall. Or use connect.microsoft.com if it is a specific malfunction related to, say, your project. You'll need to give them something to repro the error on their own machines.
This was found here and it worked for me. The problem is that I have to do that everytime I close and open a new solution. Not sure what is going on and it's very annoying. Also happens in devenv /safemode so I think that rules out a 3rd party add-on.
It's working again now, but only after I manually created an edm using the class library instead, by selecting from the solution explorer add item, EDM Entity Wizard etc. (Maybe one of the EDM wizards has some sort of faulty dependence on the continued existence of an edm model after the first one is created?)
found this and it worked perfectly for me http://blogs.msdn.com/b/calvin_hsia/archive/2010/12/27/10109339.aspx?CommentPosted=true#commentmessage
For using Entity Framework, you will need to install the following stuff:
- .NET Framework 4.0/Visual Studio 2010
- ADO.Net Entity Framework 4.3 (you can install it using NuGet)
- SQL Server Express or SQL Server 2005 or greater
To install EntityFramework 4.3.1, run following command in Package manager console (open VS2010, go to Tools → Library Package Manager → Package Manager Console):
Install-Package EntityFramework -Version 4.3.1
Simple,
- Right Click the project
- Add New Item
- Select the ADO.NET Entity Model
- Add
- Select the model which you want
It will load automatically.
精彩评论