Link to home
Avatar of fmichail
fmichailFlag for Canada

asked on

referencing Microsoft.sqlserver.Management.smo in for .Net 3.5

Where can I find the dll needed to reference for the namespace Microsoft.sqlserver.Management.smo that is compatible with .Net 3.5

When I locate the needed assemblies :


from the dll(s) in the folder C:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\ I get a message that these dll(s) needs newer version of .net FW to use.

I using .Net 3.5
SQL server 2012
and VS 2010

Please help
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

You need to install the SQL Server 2005 Feature pack and reference those versions. I don't think you need to have SQL 2005 installed.

32bit -

64bit -
Avatar of fmichail



Thanks for the quick response. If I install both 32 and 64 versions of the Feature pack on the same box?
Umm.... I'm sure you can. But i'm not sure how that will work when it comes to deployment? I don't know what you think about this... Perhaps target x86 so that you have compatibility across all architectures?
I need to use these components ONLY in my Installation Application to programatically create SQL agent job for my clients to backup the database nightly (As a part of installing my application), and my application targets SQL server 2012, so I do not think I will have an issue in running this (Kind of Setup.exe) on the client site even If I have to create 2 versions of the installation (Setup) application (Like the same concept of the 32 bit/64 bit that you are helping me to resolve now).

I know it must be a different question, but I am trying to use these namespaces only to create the sql agent job and schedule it to run nightly. Is there another alternative to do this action using the normal SQLClient namespace. Thanks
Avatar of Mlanda T
Mlanda T
Flag of South Africa image

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
What I am doing now is to make the Setup application create the SQL script for the job to create 7 rolling daily backups, and Indicate to the DBA to create this SQL agent job and schedule it to run daily, however, I wanted to take it a step further to automate even this step. But you are absolutely right, and I think it is an extra un-required step. I appreciate your help and it was really fun to discuss and learn from you. Thanks MIandaT.
Glad to have helped :)

Look around at Custom Actions as well. They allow you to add custom actions :) to your installers and stuff: