Azure PAAS 服务器中的 SSIS 脚本任务错误:命名空间中不存在类型或命名空间名称 'Office'

SSIS Script Task Error in Azure PAAS Server: The type or namespace name 'Office' does not exist in the namespace

我正在使用 SSDT(Sql 服务器数据工具)和 Visual Studio 2015 开发一个 SSIS 项目,我在脚本任务中引用了 Microsoft.Office.Interop.Excel.dll,我有通过 Azure Dev Ops(管道和发布模型)部署了项目,但它不断抛出以下消息:

脚本任务:错误 - 类型或命名空间名称 'Office' 在命名空间中不存在 'Microsoft'(是否缺少程序集引用?)

我不确定如何在 TFS 中映射 dll。

我也试过下面的方法,但没有成功。因为PaaS中没有驱动概念的概念。所以需要知道我们如何在 SSIS 脚本任务中提供 dll 引用。

public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
{
     static ScriptMain()
     {
         AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(CurrentDomain_AssemblyResolve);
     }
     static System.Reflection.Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args)
     {
         if (args.Name.Contains("ssisHelper"))
         {
             string path = @"c:\temp\";
             return System.Reflection.Assembly.LoadFile(System.IO.Path.Combine(path, "ssisHelper.dll"));
         }
         return null;
     }

有什么帮助吗?

办公自动化 DLL 是 Microsoft Office 安装的一部分(许可也是此安装的一部分)。

如果您可以在那个盒子上安装软件,您将需要这样做。否则,您将无法通过 SSIS 包使用办公自动化