<bdo id='ORR6i'></bdo><ul id='ORR6i'></ul>

    1. <i id='ORR6i'><tr id='ORR6i'><dt id='ORR6i'><q id='ORR6i'><span id='ORR6i'><b id='ORR6i'><form id='ORR6i'><ins id='ORR6i'></ins><ul id='ORR6i'></ul><sub id='ORR6i'></sub></form><legend id='ORR6i'></legend><bdo id='ORR6i'><pre id='ORR6i'><center id='ORR6i'></center></pre></bdo></b><th id='ORR6i'></th></span></q></dt></tr></i><div id='ORR6i'><tfoot id='ORR6i'></tfoot><dl id='ORR6i'><fieldset id='ORR6i'></fieldset></dl></div>

        <tfoot id='ORR6i'></tfoot>

        <small id='ORR6i'></small><noframes id='ORR6i'>

        <legend id='ORR6i'><style id='ORR6i'><dir id='ORR6i'><q id='ORR6i'></q></dir></style></legend>
      1. SQLCLR 使用错误版本的 .NET Framework

        SQLCLR using the wrong version of the .NET Framework(SQLCLR 使用错误版本的 .NET Framework)
      2. <small id='kWYok'></small><noframes id='kWYok'>

          • <i id='kWYok'><tr id='kWYok'><dt id='kWYok'><q id='kWYok'><span id='kWYok'><b id='kWYok'><form id='kWYok'><ins id='kWYok'></ins><ul id='kWYok'></ul><sub id='kWYok'></sub></form><legend id='kWYok'></legend><bdo id='kWYok'><pre id='kWYok'><center id='kWYok'></center></pre></bdo></b><th id='kWYok'></th></span></q></dt></tr></i><div id='kWYok'><tfoot id='kWYok'></tfoot><dl id='kWYok'><fieldset id='kWYok'></fieldset></dl></div>

              <tbody id='kWYok'></tbody>

                <bdo id='kWYok'></bdo><ul id='kWYok'></ul>
                <legend id='kWYok'><style id='kWYok'><dir id='kWYok'><q id='kWYok'></q></dir></style></legend>
                  <tfoot id='kWYok'></tfoot>
                  本文介绍了SQLCLR 使用错误版本的 .NET Framework的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在我们的开发服务器最近重新启动期间,SQL Server 开始为 SQLCLR 使用 .NET 4.0.这意味着在 SQL 中使用 CLR 没有任何效果,或者至少这是我通过阅读这些来源的理解:

                  During a recent restart of our development server the SQL Server started using .NET 4.0 for the SQLCLR. This means that nothing using the CLR in SQL works, or at least that's my understanding by reading these sources:

                  http://software.intel.com/en-us/blogs/2009/10/16/sql-server-2008-sqlclr-net-framework-version/

                  www.sqlskills.com/BLOGS/BOBB/post/On-SQL-Server-and-NET-40.aspx

                  我们得到的只是这种类型的错误消息:

                  All we get are error messages of this type:

                  Msg 6517, Level 16, State 1, Line 1 未能创建 AppDomainxxx.dbo[ddl].3".方法的类型签名与互操作不兼容.

                  Msg 6517, Level 16, State 1, Line 1 Failed to create AppDomain "xxx.dbo[ddl].3". Method's type signature is not Interop compatible.

                  运行语句(由@john-christensen 建议)

                  Running the statement (as suggested by @john-christensen)

                  select * from sys.dm_clr_properties
                  

                  产生以下信息:

                  *Name*      *Value*
                  directory   C:WindowsMicrosoft.NETFramework64v4.0.30319
                  version     v4.0.30319
                  state       CLR is initialized
                  

                  有谁知道如何解决这个问题,或者我们如何强制 SQL Server CLR 使用较早版本的框架?

                  Does anyone know how to solve this or how we can force SQL Server CLR to use an earlier version of the Framework?

                  推荐答案

                  通常,您可以通过在应用程序的配置文件中指定 supportedRuntime 标记来强制 .NET 应用程序使用特定的 .NET Framework 版本.

                  Typically you can force a .NET application to use a specific .NET Framework version by specifying the supportedRuntime tag in the application's config file.

                  所以您可以尝试在 SQL 实例的根路径下的 Binn 文件夹中创建一个 sqlservr.exe.config 并在其中指定您要使用的仅 .NET 版本不超过 3.5.查看此 MSDN 链接 了解配置文件的结构.

                  So you could try creating a sqlservr.exe.config in the Binn folder under the root path of the SQL instance and specify there that you would like to use only .NET versions up to 3.5. Check this MSDN link for the structure of the config file.

                  这篇关于SQLCLR 使用错误版本的 .NET Framework的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  WPF ListBox not updating with the ItemsSource(WPF ListBox 未使用 ItemsSource 更新)
                  Problem getting list box items added through jquery in code behind(在后面的代码中通过 jquery 添加列表框项目时出现问题)
                  Selected item in list box is null(列表框中的选定项为空)
                  ASP.NET: Listbox datasource and databind(ASP.NET:列表框数据源和数据绑定)
                  .NET 3.5 Listbox Selected Values (Winforms)(.NET 3.5 列表框选定值(Winforms))
                  Why does the WPF listbox change selection on mouse button down rather than button up?(为什么 WPF 列表框在鼠标按下而不是按下按钮时更改选择?)
                    <bdo id='Uyi3x'></bdo><ul id='Uyi3x'></ul>
                    <legend id='Uyi3x'><style id='Uyi3x'><dir id='Uyi3x'><q id='Uyi3x'></q></dir></style></legend>

                      1. <small id='Uyi3x'></small><noframes id='Uyi3x'>

                          <tfoot id='Uyi3x'></tfoot>
                            <tbody id='Uyi3x'></tbody>

                            <i id='Uyi3x'><tr id='Uyi3x'><dt id='Uyi3x'><q id='Uyi3x'><span id='Uyi3x'><b id='Uyi3x'><form id='Uyi3x'><ins id='Uyi3x'></ins><ul id='Uyi3x'></ul><sub id='Uyi3x'></sub></form><legend id='Uyi3x'></legend><bdo id='Uyi3x'><pre id='Uyi3x'><center id='Uyi3x'></center></pre></bdo></b><th id='Uyi3x'></th></span></q></dt></tr></i><div id='Uyi3x'><tfoot id='Uyi3x'></tfoot><dl id='Uyi3x'><fieldset id='Uyi3x'></fieldset></dl></div>