Entity Framework 5 not installing correctly?

限于喜欢 提交于 2019-12-25 18:16:11

问题


I just installed VS 2012. I created a new project to do Code First with. I then used Nuget to add EF5 to the project, as per these instructions: http://msdn.microsoft.com/en-us/data/ee712906

I then verified it's install: http://i1048.photobucket.com/albums/s361/usernames_r_stupid/Nuget_zpse7808c9b.png

Which shows that I have EF 5 installed. And indeed my App.config shows:

<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />

But if I look at the properties of the System.Data.Entity assembly reference by my project it shows version 4.0.0.0! http://i1048.photobucket.com/albums/s361/usernames_r_stupid/SystemDataProps_zps4a71be1b.png

What am I doing wrong here? This is driving me nuts.

~S


回答1:


You should be looking to EntityFramework.dll. System.Data is not the EntityFrakework assembly.




回答2:


Nuget creates a packages folder with the above mentioned EntityFramework.dll. I manually referenced it,but it ended up telling me that it was already referenced. ONce I ran my project fo the first time it showed up in my references. Weird. Was System.Data.Entity not what EF 4 lived in?



来源:https://stackoverflow.com/questions/12539742/entity-framework-5-not-installing-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!