使用 C# 以编程方式创建 SSIS 包时出现 FileNotFound 错误

问题描述 投票:0回答:0

我正在尝试使用 C# 以编程方式编写 SSIS 包。 我已经安装了 SQL Server Integration Services Projects v16 并添加了所有引用,例如 Microsoft.SqlServer.ManagedDTS 和使用 Microsoft.Dts.Runtime。 但是,在运行时,我收到一个错误:

    System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.'

我尝试从“C:\Program Files\Microsoft Visual Studio�2\Community\Common7\IDE\CommonExtensions\Microsoft\SSISp\Binn”手动添加 DLL“Microsoft.SqlServer.DTSRuntimeWrap”,但它会引发相同的错误。

我的 Microsoft SQL Server Integration Services Projects 是版本 16.0.5035.3,因此,我添加了来自 p\Binn 的引用。

然而,代码似乎要求另一个版本(Version=13.0.0.0)。

有人可以告诉我出了什么问题吗? 非常感谢!

c# sql-server ssis dllimport
© www.soinside.com 2019 - 2024. All rights reserved.