I have already raised this with Microsoft Support, but somehow this takes forever, so I thought I throw this in here and see if anyone has already encountered (and maybe solved?) this: I have a C# application that uses both Microsoft.SqlSer.SqlManagementObjects (currently 161.47027.0) and Microsoft.Data.SqlClient (currently 5.0.0.0). Since upgrading the SqlClient a while back, my SMO library is broken completely. The exception I keep getting is:
System.MissingMethodException: Method not found: 'Void Microsoft.Data.SqlClient.SqlConnectionStringBuilder.set_Encrypt(Boolean)'.
at Microsoft.SqlServer.Management.Common.ConnectionSettings.GetConnectionString()
at Microsoft.SqlServer.Management.Common.ConnectionSettings.get_ConnectionString()
at Microsoft.SqlServer.Management.Common.ConnectionManager.InitSqlConnectionObject(Boolean setConnectionString, Boolean removeIntegratedSecurity)
at Microsoft.SqlServer.Management.Common.ServerConnection..ctor()
at Microsoft.SqlServer.Management.Smo.ExecutionManager..ctor(String name)
at Microsoft.SqlServer.Management.Smo.Server..ctor(String name)
at DBHelper.GeneralDBHelper.GetServerSettings(MSSQLParameter param)
The code in question looks like this:
Server Srv;
Srv = new Server(param.DeviceName);
Where param.DeviceName is a string holding the server name.
Does anyone have a useful idea?
thx
Microsoft.Data.SqlClientversion thatMicrosoft.SqlSer.SqlManagementObjectsreferences.