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
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.
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.
Followed the steps as per this stackoverflow, rebuilt the Models from the db and voila! All Sorted
Credit to @Jaon
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With