如果有人能就我的问题提出建议,我将不胜感激。将程序集添加到SQL Server 2012时出错
我有EF版本4.5的类库项目。
项目
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For 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=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="Entities" connectionString="..." providerName="System.Data.EntityClient"/>
<add name="REPORTSEntities" connectionString="..." providerName="System.Data.EntityClient"/>
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework"/>
</entityFramework>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
当我尝试添加dll
到SQL Server 2012的App.Config
,我得到的错误:
Assembly 'entityframework, version=5.0.0.0, culture=neutral,publickeytoken=b77a5c561934e089.' was not found in the SQL catalog. (Error:6503)
我在做什么错?
非常感谢。
尝试将所需的EntityFramework程序集首先添加到SQL Server中 – opewix 2014-12-19 04:36:00
@JesseJames,当我尝试添加它时出现另一个错误:未找到system.data.entity。您正在注册的assebmly entityframework未在SQL Server托管环境中完全测试,因此不受支持。将来,如果您升级或维护此程序集或.NET框架,您的CLR集成例程可能会停止工作。 – 2014-12-19 04:47:47
检查这个线程。它关于你的错误。 http://stackoverflow.com/questions/2304357/how-to-reference-gac-assemblies-when-integrating-a-clr-extension-into-sql-server – opewix 2014-12-19 04:50:22