【问题标题】:SSIS fails to create this task?SSIS 无法创建此任务?
【发布时间】:2011-10-18 13:19:41
【问题描述】:

更新: 重新启动我的 BIDS,从 GAC 和任务文件夹中删除我的 dll,并重做整个过程后,我能够解决问题。所以我不知道到底出了什么问题,但这是值得一试的。


所以我遇到了和这里完全相同的问题: Why does SSIS fail to create this task?

完成以下任务:

using System;
using Microsoft.SqlServer.Dts.Runtime;
using System.IO;

namespace BloombergRequest
{
    [DtsTask(DisplayName= "BBG Request",
        Description= "A custom task for sending bloomberg requests",
        TaskContact = "BBG Request; OTC Fin Europe; Developed by N. Wadike - 2011.",
        TaskType= "Custom BBG task")]
    public class BBGRequest : Task
    {
        #region Constructors
        public BBGRequest()
        {
            //explode parameters into arrays and store in private fields
            _fields = Fields.Split(new Char[] { ',' });
            _headerOptions = HeaderOptions.Split(new Char[] { ',' });
            _headerValues = HeaderValues.Split(new Char[] { ',' });
            _securitiesValues = Securities.Split(new Char[] { ',' });
        }
        #endregion

        #region Override base methods

        public override DTSExecResult
            Execute(Connections connections,
            VariableDispenser variableDispenser,
            IDTSComponentEvents componentEvents,
            IDTSLogging log,
            object transaction)
        {
            try
            {
                SendRequest();
            }
            catch 
            {
                return DTSExecResult.Failure;
            }

            return DTSExecResult.Success;
        }

        public override DTSExecResult Validate(
            Connections connections,
            VariableDispenser variableDispenser,
            IDTSComponentEvents componentEvents,
            IDTSLogging log)
        {...validate my inputs}

        #endregion

        #region Private methods

        private void SendRequest()
        {
            CreateHeader();
        }

        private void CreateHeader()
        {...do some stuff...}

        #endregion

        #region Properties
        public string Fields { get; set; }
        public string HeaderOptions { get; set; }
        public string HeaderValues { get; set; }
        public string OutputFolderPath { get; set; }
        public string Securities { get; set; }

        private string[] _fields;
        private string[] _headerOptions;
        private string[] _headerValues;
        private string[] _securitiesValues;

        #endregion
    }
}

我按照上面链接的问题中解释的步骤进行操作,但没有解决我的问题。这是我的错误:

===================================

Failed to create the task. (Microsoft Visual Studio)

===================================

Cannot create a task with the name "BloombergRequest.BBGRequest, BloombergRequest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c0c17a53adc44091". Verify that the name is correct.
 (BBG_REQ)

------------------------------
Program Location:

   at Microsoft.SqlServer.Dts.Runtime.Executables.Add(String moniker)
   at Microsoft.DataTransformationServices.Design.DtsBasePackageDesigner.CreateExecutable(String moniker, IDTSSequence container, String name)

===================================

Cannot create a task with the name "BloombergRequest.BBGRequest, BloombergRequest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c0c17a53adc44091". Verify that the name is correct.
 (BBG_REQ)

------------------------------

我的项目叫 BloombergRequest,类是 BBGRequest... 我已经检查过,该 dll 在 GAC 中,我可以将其添加到我的 BIDS 工具箱中...但是当我尝试将其拖到设计器上时会弹出错误...。

【问题讨论】:

  • 自从我对 SSIS 做任何事情以来已经有一段时间了,但我认为您需要在 \program files\sql server\dts\components 的文件夹中拥有 DLL 的签名副本(或类似的;我我从这里记忆)。
  • 我关注了这个博客:grounding.co.za/blogs/brett/archive/2007/11/02/…,并且我在 C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Tasks\ 中有一个签名的 dll 副本。如果不是,它甚至不会出现在我的工具箱中。 ps:是的,如果没有签名,它就不会出现在 GAC 中

标签: c# ssis task toolbox


【解决方案1】:

从 GAC 和任务文件夹中删除我的 dll,然后重新创建

【讨论】:

    【解决方案2】:

    重新启动我的 BIDS,从 GAC 和任务文件夹中删除我的 dll,并重做整个过程后,我能够解决问题。所以我不知道到底出了什么问题,但这是值得一试的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-12-11
      • 2021-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-03
      • 2020-06-15
      • 1970-01-01
      相关资源
      最近更新 更多