Could not load file or assembly microsoft.sqlserver.sqlclrprovider 13.100.0.0

ZedZip picture ZedZip · Aug 13, 2016 · Viewed 24.3k times · Source

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

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′

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

The application has got referenced assemblies from: C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Tasks

Microsoft.SqlServer.ConnectionInfo (13.100.0.0)
Microsoft.SqlServer.SMO(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?

Answer

Charles Gagnon picture Charles Gagnon · Oct 26, 2016

Client applications should not be using the assemblies from the Program Files folders unless they are from the specific SDK folders (such as "C:\Program Files (x86)\Microsoft SQL Server\130\SDK")

The 13.100.* version of assemblies you are seeing are currently only for use by Microsoft tools and so are not placed with all needed dependencies being in the same place. The DTS folder especially has only a subset of SMO assemblies since that code does not need things such as SqlClrProvider.

Please use either the assemblies from the SDK folders or from SharedManagementObjects.msi to use as references for your applications.

-Charles Gagnon ([email protected])