I have built a Windows application to backup databases.
I downloaded SQL Server 2012, I want to add Microsoft.SqlServer.Smo.dll
and Microsoft.SqlServer.SqlWmiManagement.dll
DLLs as references to my project to connect with SQL Server 2016 and/or SQL Server 2014. What do I need to deploy in order to achieve that?
When I added references that are not related to the same SQL Server edition I got the error :
Could not load file or assembly 'Microsoft.SqlServer.WmiEnum, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Any help please?
Thanks in advance.
You need the newest version of the DLL's.
If you have the SQL Server 2012 version, you can connect to any server with a version up to 2012 - SQL Server 2005, 2008, 2008 R2, 2012.
If you want to connect to SQL Server 2014 and 2016, too, you must use the SQL Server 2016 versions of those SMO DLL's