无法加载文件或程序集 microsoft.sqlserver.sqlclrprovider 13.100.0.0 [英] Could not load file or assembly microsoft.sqlserver.sqlclrprovider 13.100.0.0

查看:38
本文介绍了无法加载文件或程序集 microsoft.sqlserver.sqlclrprovider 13.100.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 SQLServer 程序集运行我的 Winforms 应用程序Microsoft.SqlServer.ConnectionInfo (13.100.0.0)Microsoft.SqlServer.SMO(13.100.0.0)

I run my Winforms app using SQLServer assemblies Microsoft.SqlServer.ConnectionInfo (13.100.0.0) Microsoft.SqlServer.SMO(13.100.0.0)

在同一台机器上安装了 SSMS 2016(Aug).这里也安装了 SQL 2014 Dev Edition.

On the same machine SSMS 2016(Aug) is installed. And here SQL 2014 Dev Edition is installed too.

当我运行我的应用程序时,它给了我一个错误:

WHen I run my app it gives me an error:

сonnection = new ServerConnection(instanceName);
------------
Could not load file or assembly ‘microsoft.sqlserver.sqlclrprovider version=13.100.0.0′

我检查过:GAC 包含一些此程序集 11、12、13.0.0.0,但没有 13.100.0.0.

I have checked: GAC contains some this assemblies 11, 12, 13.0.0.0, but there is no 13.100.0.0.

该应用程序已从以下位置获得引用的程序集:C:Program Files (x86)Microsoft SQL Server130DTSTasks

The application has got referenced assemblies from: C:Program Files (x86)Microsoft SQL Server130DTSTasks

Microsoft.SqlServer.ConnectionInfo (13.100.0.0)
Microsoft.SqlServer.SMO(13.100.0.0)

我的操作系统是 Windows 7,我认为所有 13.100.0.0 都是由 SSMS 安装程序安装的.如何解决这个问题呢?我在哪里可以找到程序集microsoft.sqlserver.sqlclrprovider 13.100.0.0?

My OS is Windows 7 and I think all 13.100.0.0 were installed by SSMS installer. How to solve this problem? WHere I can find the assembly microsoft.sqlserver.sqlclrprovider 13.100.0.0?

推荐答案

我遇到了同样的问题.使用更新的 SSMS,主 SMO 现在安装在 "C:Program Files (x86)Microsoft SQL Server130DTSTasks" 中,VS 中的版本为 13.100.0.0(Microsoft.SqlServer.Smo.dll 文件有 13.0.15700.28 版本)但 GAC 中没有引用 Microsoft.SqlServer.SqlClrProvider.dll.当我使用 SSMS 提供的那个时,我的代码进一步出现异常.

I had the same issue. With the updated SSMS, the main SMO are now installed in "C:Program Files (x86)Microsoft SQL Server130DTSTasks" with the version 13.100.0.0 in VS (the Microsoft.SqlServer.Smo.dll file has the 13.0.15700.28 version) but there is no Microsoft.SqlServer.SqlClrProvider.dll referenced in GAC. When I take the one provided with SSMS, I get an exception further into my code.

问题是 SSMS 的安装程序将这些私有 SMO 的引用添加到 Visual Studio 的引用列表中.Charles Gagnon 给了我一个我在 .csproj 文件中实现的解决方法(使用 HintPath).

The problem is that the installer of SSMS adds reference of these private SMO to list of references of Visual Studio. Charles Gagnon gave me a workaround (the use of the HintPath) that I implemented in my .csproj files.

这篇关于无法加载文件或程序集 microsoft.sqlserver.sqlclrprovider 13.100.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆