Error in VS2010 when using EntityFramework 5.0 and trying to generate model.tt using EF 5.x dbContext generator

0

About 6 months ago I successfully completed a VS2010 project that included a database and various context objects generated with EF 5.x dbContext generator. Now when I rebuild that project I get a series of errors that seem to stem from the following:

Error 1 Running transformation: System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'EnvDTE.ProjectItem'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{0B48100A-473E-433C-AB8F-66B9739AB620}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).

This seems to be related to the EnvDTE.dll failing to load. I tried explicitly registering EnvDTE.dll, but that failed with the message:

The Module "envdte.dll" was loaded but the entry-point DllRegisterServer was not found.

This suggests to me that envdte.dll may be corrupted. Could this be the case? I have not found a trustworthy source to re-download envdte.dll.

I also created a brand new VS2010 project and created a datamodel with EF 5.0 and then tried to create the context items as above, with exactly the same results.

Has anyone encountered this and does anyone have a solution?

entity-framework
visual-studio-2010
dbcontext
asked on Stack Overflow Aug 10, 2017 by pjh • edited Aug 10, 2017 by pjh

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0