c# - How to upgrade from entity framework 4 to EF6? -
i want create entitydatamodel entity framework 6 every time try error:
your project references older version of entity framework.
i'm using visual studio 2013 , project asp.net 4.5.1 web forms project. web.config file, deleted sections of file in order solve problem in vain.
<?xml version="1.0"?> <!-- more information on how configure asp.net application, please visit http://go.microsoft.com/fwlink/?linkid=169433 --> <configuration> <configsections> <!-- more information on entity framework configuration, visit http://go.microsoft.com/fwlink/?linkid=237468 --> <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=6.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false"/> </configsections> <!-- description of web.config changes see http://go.microsoft.com/fwlink/?linkid=235367. following attributes can set on <httpruntime> tag. <system.web> <httpruntime targetframework="4.5.1" /> </system.web> --> <system.web> <compilation debug="true" targetframework="4.5.1"> <assemblies/> </compilation> <httpruntime targetframework="4.5"/> <customerrors mode="off"/> </system.web> <system.codedom> <compilers> <!--<compiler language="c#;cs;csharp" extension=".cs" type="microsoft.codedom.providers.dotnetcompilerplatform.csharpcodeprovider, microsoft.codedom.providers.dotnetcompilerplatform, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" warninglevel="4" compileroptions="/langversion:6 /nowarn:1659;1699;1701" /> <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="microsoft.codedom.providers.dotnetcompilerplatform.vbcodeprovider, microsoft.codedom.providers.dotnetcompilerplatform, version=1.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" warninglevel="4" compileroptions="/langversion:14 /nowarn:41008 /define:_mytype=\"web\" /optioninfer+" /> --> </compilers> </system.codedom> <appsettings> <add key="validationsettings:unobtrusivevalidationmode" value="none"/> </appsettings> <connectionstrings> <add name="tebimir_db_tebimentities" connectionstring="metadata=res://*/dataaccesslayer.tebimir_db_tebim.csdl|res://*/dataaccesslayer.tebimir_db_tebim.ssdl|res://*/dataaccesslayer.tebimir_db_tebim.msl;provider=system.data.sqlclient;provider connection string="data source=tebim.ir,9993;initial catalog=tebimir_db_tebim;persist security info=true;user id=tebimir_dbadmin;password=qwerty*2607548;multipleactiveresultsets=true;app=entityframework"" providername="system.data.entityclient"/> <add name="tebimir_db_tebimentities_plain" connectionstring="data source=185.94.97.58,9993;initial catalog=tebimir_db_tebim;persist security info=true;user id=tebimir_dbadmin;password=qwerty*2607548;"/> </connectionstrings> <system.webserver> <defaultdocument> <files> <clear/> <add value="index.aspx"/> </files> </defaultdocument> <validation validateintegratedmodeconfiguration="false"/> </system.webserver> <entityframework> <defaultconnectionfactory type="system.data.entity.infrastructure.localdbconnectionfactory, entityframework"> <parameters> <parameter value="mssqllocaldb"/> </parameters> </defaultconnectionfactory> <providers> <provider invariantname="system.data.sqlclient" type="system.data.entity.sqlserver.sqlproviderservices, entityframework.sqlserver"/> </providers> </entityframework> </configuration>
try updating entity framework using nuget before adding model, follow these steps
right click on project in vs solution explorer , select 'manage nuget packages'
select entityframework ad click update.
now add entity data model.
Comments
Post a Comment