Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EntityFrameworks.dll file missing?

I am totally new to the .NET world and been trying to build an MVC application following this tutorial, creating a database first then creating an MVC project on top of it and whenever I create the Models from the existing db I get a number of errors like this:

Error 1 Compiling transformation: Metadata file '%VS120COMNTOOLS%..\IDE\EntityFramework.dll' could not be found c:\users\j\desktop\visual studio 2013\Projects\ContosoSite\ContosoSite\Models\ContosoModel.tt

And this one also:

Error 2 Compiling transformation: Metadata file '%VS120COMNTOOLS%..\IDE\Microsoft.Data.Entity.Design.dll' could not be found c:\users\j\desktop\visual studio 2013\Projects\ContosoSite\ContosoSite\Models\ContosoModel.tt

I have Entity Frameworks installed (version 6.1)

after hours of googling and searching for answers apparently there is a(or many) file(s) missing (dll?) in my Windows 8.1 OS.

Has anyone come up with a solution for this?

J

like image 244
Jax Avatar asked Apr 12 '14 14:04

Jax


People also ask

Where can I find EntityFramework DLL?

The file that needs to be edited is in the “C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes” directory.

How do I reference EntityFramework DLL?

Go to references --> Add Reference --> in the dialog, choose COM and press browse. Then go to your project which is using EF and go to the projects bin folder where the EF references are stored. Select the EntityFramework.


1 Answers

Followed the steps as per this stackoverflow, rebuilt the Models from the db and voila! All Sorted

Credit to @Jaon

  1. Check your install location. I installed VS to the other location D:\ than default C:\ so I got the error.
  2. modify "Environment Variables" to your location, for me it means changing C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\ to D:\Microsoft Visual Studio 12.0\Common7\Tools.
  3. DON'T Forget to add a \ to the end of word.
like image 112
Jax Avatar answered Oct 04 '22 16:10

Jax