无法将类型“System.__ComObject”的 COM 对象转换为接口类型“Microsoft.SqlServer.Dts.Runtime.Wrapper.Sql2019.IDTSApplication160”

2024-03-18

我将 SSIS 与 Visual Studio 2019 结合使用,在 SQL Server 2019 上创建和部署包。最初,当我的包在 SSDT 上运行时,我将其部署在 SSMS 集成服务器上,但没有输出。

所以,我检查了 Visual Studio 2019:项目 -> 项目属性 -> 配置属性 -> 常规 -> 目标版本,被设置为SQL Server 2022,所以我把它改成了SQL Server 2019.

当我尝试在 Visual Studio 2019 中再次运行该包时,出现以下错误: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)).".

我尝试注册C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\DTS.dll using regsvr32这表明成功,但我仍然遇到同样的错误。

我也尝试过注册Microsoft.SqlServer.DTSRuntimeWrap.dll using 执行程序,仍然没有运气。

有人可以告诉我为什么会出现此错误以及如何解决此问题。 先感谢您。


这是解决方法。

解决方法如下:解决方案资源管理器 -> 右键单击​​项目 -> 属性 -> 调试 -> Run64bitRuntime -> 设置为 false。

取自https://marketplace.visualstudio.com/items?itemName=SSIS.SqlServerIntegrationServicesProjects#:~:text=SSIS%20Execute%20Package,set%20to%20false https://marketplace.visualstudio.com/items?itemName=SSIS.SqlServerIntegrationServicesProjects#:%7E:text=SSIS%20Execute%20Package,set%20to%20false.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法将类型“System.__ComObject”的 COM 对象转换为接口类型“Microsoft.SqlServer.Dts.Runtime.Wrapper.Sql2019.IDTSApplication160” 的相关文章

随机推荐