SSIS Custom Task - Version Property

We have a custom SSIS task (not a component) and you need to add a new property. It would be nice to support SSIS update functionality, so all clients have to deal with existing packages in order to update them.

We have already implemented the Update and CanUpdate methods, but we cannot find a way to update the Version property of the custom task as it is read-only.

Is there a way to set the Version property?

Thanks everyone!

+3


source to share


1 answer


The property is a virtual (as well as methods and ) so you can override it in the same way: Task.Version

Update

CanUpdate



[DtsTask (/* whatever your task attributes are */)]
public class MyDemoTask : Task
{
    public override bool CanUpdate(string CreationName)
    {
        // your code here
    }
    public override void Update(ref string ObjectXml)
    {
        // your code here
    }
    public override int Version
    {
        get
        {
            return 42;
        }
    }
}

      

+2


source







All Articles