asp.net mvc 4 - EntityFramework 5 install -
i created asp.net mvc4 project in vs 2010, decided wanted 4.5 framework opened project in vs 2012 , changed target framework 4.5.
i got compile errors sure caused reference version of entityframework below version 5.
eg:
error 2 type or namespace name 'table' not found (are missing using directive or assembly reference?) c:\users\saad\documents\visual studio 2012\projects\mvcapplication1\mvcapplication1\models\accountmodels.cs 21 6 mvcapplication1
here entries in web.config file:
<configsections> <!-- more info on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 --> <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=4.4.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" /> </configsections>
and ...
<assemblies> <add assembly="system.data.entity, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" /> </assemblies>
i had no luck changing entityframework reference higher version did not appear in framework list.
following advice given similar problem, tried utilize bundle manager console solve problem. can see mess i've got below.
does have thought how resolve problem?
i need version 5 work doing.
pm> uninstall-package entityframework removed 'entityframework 5.0.0' personalitytest_002. directory not empty.
successfully uninstalled 'entityframework 5.0.0'.
pm> install-package entityframework install-package : remote name not resolved: 'nuget.org' @ line:1 char:16 + install-package <<<< entityframework + categoryinfo : notspecified: (:) [install-package], webexception + fullyqualifiederrorid : nugetcmdletunhandledexception,nuget.powershell.commands.installpackagecommand pm> install-package entityframework 'entityframework 5.0.0' installed. directory not empty.
successfully uninstalled 'entityframework 5.0.0'. install-package : failed add together reference 'entityframework'. @ line:1 char:16 + install-package <<<< entityframework + categoryinfo : notspecified: (:) [install-package], invalidoperationexception + fullyqualifiederrorid : nugetcmdletunhandledexception,nuget.powershell.commands.installpackagecommand pm> install-package entityframework 'entityframework 5.0.0' installed. directory not empty.
successfully uninstalled 'entityframework 5.0.0'. install-package : failed add together reference 'entityframework'. @ line:1 char:16 + install-package <<<< entityframework + categoryinfo : notspecified: (:) [install-package], invalidoperationexception + fullyqualifiederrorid : nugetcmdletunhandledexception,nuget.powershell.commands.installpackagecommand pm> install-package entityframework 'entityframework 5.0.0' installed. directory not empty.
successfully uninstalled 'entityframework 5.0.0'. install-package : failed add together reference 'entityframework'. @ line:1 char:16 + install-package <<<< entityframework + categoryinfo : notspecified: (:) [install-package], invalidoperationexception + fullyqualifiederrorid : nugetcmdletunhandledexception,nuget.powershell.commands.installpackagecommand pm> uninstall-package entityframework -force uninstall-package : unable find bundle 'entityframework'. @ line:1 char:19 + uninstall-package <<<< entityframework -force + categoryinfo : notspecified: (:) [uninstall-package], invalidoperationexception + fullyqualifiederrorid : nugetcmdletunhandledexception,nuget.powershell.commands.uninstallpackagecommand pm> install-package entityframework 'entityframework 5.0.0' installed. directory not empty.
successfully uninstalled 'entityframework 5.0.0'. install-package : failed add together reference 'entityframework'. @ line:1 char:16 + install-package <<<< entityframework + categoryinfo : notspecified: (:) [install-package], invalidoperationexception + fullyqualifiederrorid : nugetcmdletunhandledexception,nuget.powershell.commands.installpackagecommand pm>
if using nuget (if not, do) may need remove , add together packages switch 4.5. if open packages.config can see versions.
asp.net-mvc-4 visual-studio-2012 nuget entity-framework-5
No comments:
Post a Comment