I need to use Server class which is stored in Microsoft.SqlServer.Smo.dll I don\'t see this assembly in usual References dialog. I have found it at C:/Program Files/Microsof
I know this is an old question, but I just ran into the same issue. @Mitch_Wheat is correct that as a minimum you need references to the 4 SMO assemblies. Trying to add all 4 at once, however, gave me the error you listed.
Adding the assemblies one at a time bypassed the error.
For those who need the sql server 2014 version (version 120) you need to download and install the following packages from Microsoft:
You can find all relevant info on Microsoft website on this page (as suggested correctly by @mitch-wheat ): https://www.microsoft.com/en-gb/download/details.aspx?id=42295
To synchronize a pull subscription on demand in Management Studio Connect to the Subscriber in Management Studio, and then expand the server node.
Expand the Replication folder, and then expand the Local Subscriptions folder.
Right-click the subscription you want to synchronize, and then click View Synchronization Status.
In the View Synchronization Status - : dialog box, click Start. When synchronization is complete, the message Synchronization completed is displayed.
Click Close.
An easy way to get all 7 ddls
that related on this issue is
Microsoft.SqlServer.ConnectionInfo.dll,
Microsoft.SqlServer.ConnectionInfoExtended.dll,
Microsoft.SqlServer.Management.Sdk.Sfc.dll,
Microsoft.SqlServer.Smo.dll,
Microsoft.SqlServer.SmoExtended.dll,
Microsoft.SqlServer.SqlClrProvider.dll,
Microsoft.SqlServer.SqlEnum.dll
Create a separate console application
download those using nuget
PM> Install-Package Microsoft.SQLServer.SMO -Version 12.0.2000.8
build the application and all dlls
will be in the bin
folder ... you can copy from there and add reference to your existing application
https://www.nuget.org/packages/Microsoft.SQLServer.SMO/12.0.2000.8
In the case that you want use Backup
class add Microsoft.SqlServer.Management.SmoExtended to your project.