Metadata file not found - Data.Entity.Model

前端 未结 9 718
失恋的感觉
失恋的感觉 2020-12-03 14:35

Anyone having similar problem, while creating webservices?

Compiling transformation: Metadata file \'D:\\Program Files\\VS2013\\Common7\\Tools..\\ID

相关标签:
9条回答
  • 2020-12-03 14:59

    The problem lies in the fact that the file originally EF6.Utility.CS.ttinclude wrong. Even if the variable %VS120COMNTOOLS% is the correct value, the error still occurs.

    Blame the two stupid points in the following lines (%VS120COMNTOOLS%..\IDE):

    <#@ assembly name="%VS120COMNTOOLS%..\IDE\EntityFramework.dll" #>
    <#@ assembly name="%VS120COMNTOOLS%..\IDE\Microsoft.Data.Entity.Design.dll" #>
    

    If that's the way to fix the error no longer occurs:

    <#@ assembly name="%VS120COMNTOOLS%\IDE\EntityFramework.dll" #>
    <#@ assembly name="%VS120COMNTOOLS%\IDE\Microsoft.Data.Entity.Design.dll" #>
    

    And the variable %VS120COMNTOOLS% must have the correct value, of course.

    The question is old, but the answer is still relevant now, because this error persists, and in the VS2015. Below lines from the ill-fated file:

    <#@ assembly name="%VS140COMNTOOLS%..\IDE\EntityFramework.dll" #>
    <#@ assembly name="%VS140COMNTOOLS%..\IDE\Microsoft.Data.Entity.Design.dll" #>
    

    Sorry.

    0 讨论(0)
  • 2020-12-03 15:02

    I know this is late to respond to the question but.

    This work For me by following the below steps.

    1. Copy the code form the existing abc.tt file.
    2. Delete the abc.tt file.
    3. Copy all the code again into ABC.tt file.

    After copy code just save the file and build the solution it will regenerate the complete .cs file as well.

    0 讨论(0)
  • 2020-12-03 15:08

    Try this:

    1. Double Click on the .edmx Model
    2. Right click anywhere on the "Entity Data Model Designer"
    3. Click "Update Model from Database"
    4. Click Finish
    0 讨论(0)
提交回复
热议问题