tags:

views:

20

answers:

1

In my C# 3.5 application I am using SMO to locate runnin SQL Server instances. However, on a clean machine with SQL Server installed I receiving the following exception:

Microsoft.SqlServer.Management.Sdk.Sfc.EnumeratorException: Failed to retrieve data for this request. ---> System.IO.FileNotFoundException: Could not find Assembly "Microsoft.SqlServer.SqlClrProvider,

What should I install to have this assemble? SQL Server is installed!

A: 

You don't mention the version or edition of MSSQL, but the SMO components are normally installed with the Client Tools, so if you're using Express Edition then they may not be installed at all.

This is apparently a common issue (first hit on Google for "Microsoft.SqlServer.SqlClrProvider"):

http://social.msdn.microsoft.com/Forums/en-US/sqlnetfx/thread/1d2cb76b-642f-4067-9667-aacdbc142f74

The SMO components can be downloaded here:

http://www.microsoft.com/downloads/en/details.aspx?FamilyId=C6C3E9EF-BA29-4A43-8D69-A2BED18FE73C&displaylang=en

Pondlife
Thanks, Pondlife!
Alex