Backward Compatibility in SMO
Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).
SMO applications that were written using previous versions of SQL Server can be recompiled by using SMO in SQL Server 2016.
References to SMO dlls in older versions of SQL Server must be removed, and references to the new SMO dlls that are provided with SQL Server 2016 must be included.
Minimally, you would reference the following:
These files are required for connection classes, SMO utility classes, and foundation classes.
SmoEnum.dll has been removed so references to it must be removed from the SMO SQL Server 2016 project.
The namespaces have also changed, so you can use the following:
For Visual C#
For Visual Basic
Imports Microsoft.SqlServer.Management.Smo Imports Microsoft.SqlServer.Management.Common
If your code uses Urn functionality, such as Server.GetSqlSmoObject(Urn), you must link to the Microsoft.SqlServer.Management.Sdk.Sfc namespace.
If your code uses the Transfer object directly, you will have to link to the Microsoft.SqlServer.Management.SmoExtended namespace.
When you migrate code, you might have to modify the code. This is because several SQL Server 2005 and SQL Server 2008 features have been deprecated in SQL Server 2016. For more information about deprecated features, see Deprecated Database Engine Features in SQL Server 2016 in SQL Server 2016 Books Online.