Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.Sql2019.IDTSApplication160'

Viewed 1806

I am using SSIS with Visual Studio 2019 for creating and deploying packages on SQL Server 2019. Initially when my package was running on SSDT I deployed it on SSMS Integration server but there was no output.

So, I Checked in Visual Studio 2019: Project -> Project Properties -> Configuration Properties -> General -> Target Version, which was set to SQL Server 2022, So I changed it to SQL Server 2019.

When I tried to run the package again in Visual Studio 2019 I got this error: Failed to load the package "Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.Sql2019.IDTSApplication160'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{037FE238-12C5-4313-AE13-9E116E90ACEA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).".

I tried registering the C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\DTS.dll using regsvr32 which shows success, but I am still getting the same error.

I also tried registering Microsoft.SqlServer.DTSRuntimeWrap.dll using gacutil.exe, still no luck.

Can someone tell me why am I getting this error and how to solve this. Thank you in advance.

4 Answers

I had the same problem with my VS 2019 after update to SSIS Projects 4.0. If possible, uninstall this version and install the latest general availability (GA) version 3.16, which can be downloaded here:

https://marketplace.visualstudio.com/items?itemName=SSIS.SqlServerIntegrationServicesProjects

https://ssis.gallerycdn.vsassets.io/extensions/ssis/sqlserverintegrationservicesprojects/3.16/1645603822968/Microsoft.DataTools.IntegrationServices.exe

It solved the problem, you can run in 64bit runtime after downgrade.

I have only updated SSIS extension 3.16 to 4.0. I got same error. You should change configuration properties from right click project ->properties->debugging->Run64bitRuntime->set to false. After that when i want to initiate VS, i got this warning '../Visual Studio 2019.lnk side by side configuration is incorrect'. I resolved the problem through repairing of SQL Server Integration Services Projects on Control Panel-->Programs and Properties.

I had the same problem start after updating Microsoft Data Tools Integration Services VS extension because of prompt by VS. The upgrade was to v4.0 which is not yet generally available.

https://marketplace.visualstudio.com/items?itemName=SSIS.SqlServerIntegrationServicesProjects

On that page it states that "Version 3.16 is the latest general availability (GA) version, which does not support target server version SqlServer2022." There you will find a link to v3.16.

Uninstall v4.0 which, given how recently it was released, is probably still in your downloads folder, otherwise use Extension Manager. Then download and install 3.16. Be warned, both the uninstall and retro install were extremely slow.

Without a reboot, I opened the project and the package that failed with v.4.0, ran first time without problem.

Hope this helps somebody.

Related