This post giving one of the possible solution to resolve the error above.
You have a Script Task in SSIS and utilizing the Connection Manager. The Connection Manager Provider type is Native OLE DB\SQL Server Native Client 11.0 .
![SSIS Unable to cast COM object of type ‘System.__ComObject’ to class type ‘Sy ...]()
You have code inside the Script Task.
ConnectionManager cm;
cm = Dts.Connections[ “LocalHost.uCustoms” ];
SqlConnection sqlConn;
sqlConn = ( SqlConnection )cm.AcquireConnection(Dts.Transaction);
You get the error
“System.InvalidCastException was unhandled by user code
HResult=-2147467262
Message=Unable to cast COM object of type ‘System.__ComObject’ to class type ‘System.Data.SqlClient.SqlConnection’. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
Source=ST_28dc48d9f81b48c88c82e0c815d09082″
You need to change your Connection Manager to .NET Provider\SqlClient Data Provider .
![SSIS Unable to cast COM object of type ‘System.__ComObject’ to class type ‘Sy ...]()
You have a Script Task in SSIS and utilizing the Connection Manager. The Connection Manager Provider type is Native OLE DB\SQL Server Native Client 11.0 .

You have code inside the Script Task.
ConnectionManager cm;
cm = Dts.Connections[ “LocalHost.uCustoms” ];
SqlConnection sqlConn;
sqlConn = ( SqlConnection )cm.AcquireConnection(Dts.Transaction);
You get the error
“System.InvalidCastException was unhandled by user code
HResult=-2147467262
Message=Unable to cast COM object of type ‘System.__ComObject’ to class type ‘System.Data.SqlClient.SqlConnection’. Instances of types that represent COM components cannot be cast to types that do not represent COM components; however they can be cast to interfaces as long as the underlying COM component supports QueryInterface calls for the IID of the interface.
Source=ST_28dc48d9f81b48c88c82e0c815d09082″
You need to change your Connection Manager to .NET Provider\SqlClient Data Provider .
