SSIS: Update Version of a Custom Task

Marco Kroeger 1 Reputation point
2020-09-14T13:18:27.247+00:00

Hi there,

I developed a Custom Task for usage in the Control Flow in an SSIS-Package. Everything was working fine and I used the Task in some Packages. Now I made some (none breaking) changes to the Task and updated the Version from 1.0.0.0 to 1.1.0.0. I can use the new Version again flawlessly in new packages. But If I'm open a old package which used Version 1.0.0.0 from the task I get an error and can't edit or use the Task Component allready in the package. The Error is like:

Error loading exe_staging_customer.dtsx: Cannot create a task from XML for task "Log Error", type "MyCompany.Bi.Components.Logging.ExecutionLogTask, MyCompany.ExecutionLogTask, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b7fdbcb6d45028ca" due to error 0x80131040 "".

Basicly it's saying that it can't find the assembly. This seems reasonable because I updated it. But how do I tell SSIS/Visual Studio that it should update the Meta-Information and use the new Version? Well OK, i COULD edit the Package-Source and modify the version. But this would be the least preferable way.

I found Information on updating Dataflow Components with their PerformUpgrade-Method, but Tasks don't have this Method. They have an Update and CanUpdate-Method which are both deprecated with no real Info on what to use instead..

Can anyone tell me how to achieve Updates for Custom Task Components in SSIS? What is the usual workflow?

Cheers

SQL Server Integration Services
SQL Server Integration Services
A Microsoft platform for building enterprise-level data integration and data transformations solutions.
2,576 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Monalv-MSFT 5,901 Reputation points
    2020-09-15T01:44:35.183+00:00

    Hi @Marco Kroeger ,

    Packages that were created with an older version of your component may contain metadata that is no longer valid, such as custom properties whose usage has been modified in newer versions of the component. You can override the PerformUpgrade method of the PipelineComponent base class to update the metadata previously saved in older packages to reflect the current properties of your component.

    When you recompile a custom component for a new version of Integration Services, you do not have to change the value of the CurrentVersion property if the component's properties have not changed.

    Please refer to Upgrading the Version of a Data Flow Component.

    Best Regards,
    Mona


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Marco Kroeger 1 Reputation point
    2020-09-15T06:57:55.92+00:00

    Hi and thank you for your reply,

    but I think you are misunderstanding me. If I'm changing the Assemblyversion, of either a Task Component or Dataflow Component, I also need to Change the Version in the UITypeName in the Metainformations of the Implementation Class for Task and Dataflow Components. But if I do this and publish the new .dll's to the apropriate folders (DTS...), on opening packages which used the old version of the components I get the mentioned Error and can't open the component either. It's kind of logical because the in the Package referenced Component-Version does not exist anymore. And it does not seem to use the new version instead automaticaly. And if it doesn't it wont execute the PerformUpgrade-Method of Dataflow Components at all. And even if it did for Dataflow Components I couldn't find such mechanism for Task Components.

    Target Server Version or Integration Services Version didn't change at all. It's just a Function Update of the Component which should be reflected in it's version.

    Greetings

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.