Fix: COM error when creating DTS.PackageClass object

This blog explains the fix for the COM component error when creating DTS.PackageClass object in .net.

Hello folks,

Today we will discuss the issue and fix when working with different DTS Interop assemblies (i.e. Interop.DTS.dll, Microsoft.SQLServer.ManagedDTS etc.)

While debugging the application which uses these assemblies, I found that application is failing when creating object of DTS.PackageClass as below

DTS.PackageClass dts = new DTS.PackageClass(); //Failing with error: Retrieving the COM class factory for component with CLSID {10020200-EB1C-11CF-AE6E-00AA004A34D5} failed due to the following error: 80040154.

The root cause of the error is that- referred COM component is not registered with the machine and hence failing when creating the object.

The fix is to install SQL Server Backward Compatibility package which includes the latest versions of Data Transformation Services 2000 runtime (DTS), SQL Distributed Management Objects (SQL-DMO), Decision Support Objects (DSO), and SQL Virtual Device Interface (SQLVDI).

Please install one of them from below url (select the link which suites your machine type)

This fixes the issue.
Please share your comments if you find it useful.