EntityFrameworks.dll file missing?

asp.net asp.net-mvc asp.net-mvc-5 c# entity-framework

Question

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

1
4
4/14/2014 1:30:47 PM

Accepted Answer

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.
3
5/23/2017 12:31:01 PM

Popular Answer

The project in the example uses the help of a library called "Entity Framework" to help with database queries. In Visual Studio these libraries are installed as Nuget Packages. For more info about Nugets, check this link

In order to install this library follow these steps in your Visual Studio IDE. Go to Tools>Package Manager Console>Package Manager Console. When the console opens up, type "Install-Package EntityFramework" and hit enter key. This will install Entity Framework Nuget Package to your IDE. Then you can use this library by adding a using reference.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow