Metadata file not found - Data.Entity.Model

前端 未结 9 717
失恋的感觉
失恋的感觉 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:43

    This worked for me.

    1. Go to C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF6.Utility.CS.ttinclude

    2. Edit it with Visual Studio.

    3. Remove the two dots after the URL, so the new lines like:

      <#@ assembly name="%VS120COMNTOOLS%\IDE\EntityFramework.dll" #>
      <#@ assembly name="%VS120COMNTOOLS%\IDE\Microsoft.Data.Entity.Design.dll" #>
      
    4. Fix your environment variables to end with directory just befor IDE. In my case

      C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\
      
    5. Rebuild the project or delete the entity framework and recreate it.

    0 讨论(0)
  • 2020-12-03 14:45

    I believe VS is not updating the VS120COMNTOOLS variable correctly when reinstalling VS to a different drive. See this SO thread for an extended answer.

    0 讨论(0)
  • 2020-12-03 14:47

    Good day guys, Ive encountered this error in the app im working on what I did was: 1. revert the solution/module where the entities, 2. Remove the %VS110COMN% so the code will look like this

    <#@ assembly name="..\IDE\EntityFramework.dll" #>
    <#@ assembly name="..\IDE\Microsoft.Data.Entity.Design.dll" #>
    
    0 讨论(0)
  • 2020-12-03 14:48

    Based on

    C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes\EF6.Utility.CS.ttinclude

    , the code generator is looking for the missing DLLs in the following locations:

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

    I discovered that the environment variable %VS120COMNTOOLS% is not compatible with the correct installation path of visual studio, so I changed it from Advanced system properties and it worked

    0 讨论(0)
  • 2020-12-03 14:48

    Not sure why this is happening. One of my colleague faced this issue when he is trying to generate database from Model in a common server that we are using. I tried in the same machine with my login from my PC and it worked for first time and i tried again and i got the same error. I just did a

    devenv /resetsetting
    

    in VS 2013 command prompt and it worked. Did the same in my colleagues machine and it worked too. Not sure it will workbut wort a try

    0 讨论(0)
  • 2020-12-03 14:49
    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.
    0 讨论(0)
提交回复
热议问题