Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not load file or assembly Microsoft.SqlServer.SqlClrProvider on production ASP.net site, where is it?

Tags:

On my ASP.net site I have a reference to Microsoft.SQLserver.SMO. I copied this reference onto my production server and got a could not load error for Microsoft.SqlServer.Management.Sdk.Sfc. This error was fixed by copying the dll from the

C:\Program files\Microsoft Sql Server\110\SDK\Assembilies 

However I then got the same error but for Microsoft.SqlServer.SqlClrProvider which is nowhere to be found.

Where can I find the SqlClrProvider dll? It works on my localhost so it must be somewhere.

like image 255
user2945722 Avatar asked Mar 07 '14 16:03

user2945722


1 Answers

On your development machine or a machine where you have SQL Server installed, the Microsoft.SqlServer.SqlClrProvider.dll file is in your GAC. However, you cannot copy this file without making changes to the registry.

Using the registry editor, go to HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Fusion. Add a new DWORD called DisableCacheViewer. Give it a value of 1.

Once this change is made, you can go to C:\Windows\assembly\GAC_MSIL\Microsoft.SqlServer.SqlClrProvider\ to get the dll you need.

To see a more detailed explanation, follow one of these links:

  • HOW TO RESOLVE “SQLCLRPROVIDER NOT FOUND” WITHOUT INSTALLING SQL SERVER ON THE CLIENT MACHINE OR NEEDING A DEPLOYMENT PROJECT
  • Could not load file or assembly Microsoft.SqlServer.SqlClrProvider
like image 67
Daniel Avatar answered Sep 30 '22 14:09

Daniel