Loading ...

Microsoft.SqlServer.SMO and Microsoft.SqlServer.Management assemblies issue | CodeAsp.Net

Microsoft.SqlServer.SMO and Microsoft.SqlServer.Management assemblies issue

 /5
0 (0votes)

We had created a Visual Studio project in C# to create  SQL Server 2005 database via C# code. We were referencing these assemblies:

Microsoft.SqlServer.Management.Sdk.Sfc.dll

Microsoft.SqlServer.Smo.dll

Microsoft.SqlServer.ConnectionInfo.dll

We also added this DLL but did not reference it as we realized it was required internally by the above assemblies: Microsoft.SqlServer.SqlClrProvider.dll

We were using SQL Server 2008 locally (10.0.xx), but when we deployed these assemblies on the remote server (which had SQL Server 2005), we got an error asking us to use the 2005 specific files of these versions (9.0.xx). So we had to download the 2005 versions of these assemblies. We did that using Microsoft SQL Server 2005 Feature Pack:

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=24793

Make sure you download the x64 bit version if you have 64-bit SQL Server installed. After installing this pack, we were able to copy the 9.0.xx versions of these assemblies from  C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies. Once these assemblies were deployed in the /bin folder of our app, the program worked without any issues.

Comments (no comments yet)

Top Posts