【问题标题】:Can we add a custom project dll to script task in ssis?我们可以将自定义项目 dll 添加到 ssis 中的脚本任务吗?
【发布时间】:2011-12-10 04:41:10
【问题描述】:

我正在 ssis 2008 中创建一个集成服务项目,并尝试将我的自定义项目 dll 添加到脚本任务引用并执行包,我遇到了异常提示

Error: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'example, Version=1.0.0.0, Culture=neutral, PublicKeyToken=--------' or one of its dependencies. The system cannot find the file specified.
File name: 'Example, Version=1.0.0.0, Culture=neutral, PublicKeyToken=-------'
   at ST_-------------.csproj.ScriptMain.Main()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [---\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [---\Software\Microsoft\Fusion!EnableLog].

   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTATaskScriptingEngine.ExecuteScript()

【问题讨论】:

    标签: asp.net visual-studio-2010 ssis


    【解决方案1】:

    您的问题的简短回答是“是”。

    但是,自定义 DLL 需要安装在 GAC 中在执行包之前添加到 .NET Framework 文件夹中。 (验证需要 .NET Framework 副本,执行需要 GAC 副本。是的,这很烦人。)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-08-25
      • 1970-01-01
      • 1970-01-01
      • 2020-11-17
      • 2022-01-06
      • 2013-10-10
      相关资源
      最近更新 更多