UPDATE: 在重新启动我的BIDS之后,从GAC和任务文件夹中删除了我的dll,并重新整理了整个过程,然后我就能够将其解决。所以我不知道到底发生了什么问题,但这是值得尝试的事情。SSIS无法创建此任务?
所以,我必须完全按照这里同样的问题: 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任何一段时间,但我认为你需要有DLL的文件夹中的\ Program Files文件签署的副本\ SQL服务器\ DTS \组件(或类似的;我是从这里开始的内存去)。 – Dave
我跟着这个博客:http://grounding.co.za/blogs/brett/archive/2007/11/02/developing-a-custom-control-flow-task-for-ssis-part-8.aspx和我有签名的DLL的一个副本在C:\ Program Files文件(x86)的\ Microsoft SQL Server的\ 100个\ DTS \任务\。如果没有,它甚至不会出现在我的工具箱中。 PS:是的是如果没有它不会在GAC露面签署 – nche