Hi,
I am facing a problem. I have custom data flow transformation.We have saved a package using component's earlier assembly version. Now when we install later version of the component the saved package fails to open. If I try creating new package it succeeds.
Error message :
Error 1 Validation error. Data Flow Task: DTS.Pipeline: The component metadata for "component "Oracle Destination" (153)" could not be upgraded to the newer version of the component. The PerformUpgrade method failed. Package.dtsx 0 0
We tried overriding "perform upgrade" method but still I am facing the same issue.
Dharmbir
There is a good sample on how to overridfe PerformUpgrade here:
http://msdn2.microsoft.com/ko-kr/library/ms345168.aspx
The minimal thing that you need to do in the PerformUpgrade method is to upgrade the version (see the last line of code in the link above)
Thanks,
Ovidiu
Hi,
I implemented this, still I am getting the error.
If I have earlier version of the Component in the GAC it does not give me the error and component runs. But if I have only the latest version of the assembly in the GAC it gives me error, though I have gaced its policy file also.
thanks
Dharmbir
|||You can automatically upgrade a dataflow component's metadata when you upgrade the component's assembly version.
1. Remove the old assembly from GAC.
2. Make sure your new component's CurrentVersion argument of the DtsPipelineComponent attribute is greater than the one saved in the old metadata. That'll ensure that PerformUpgrade of the new component will be called when SSIS opens the package.
3. In the new component override PerformUpgrade and in it make sure to include the following:
ComponentMetaData.CustomPropertyCollection["UserComponentTypeName"].Value = this.GetType().AssemblyQualifiedName;
This changes the metadata's type reference to refer to the new type and version. This will ensure that things like doubleclick on the component will work if you're using UITypeName argument of DtsPipelineComponent attribute for example.
Of course here you should also upgrade any metadata properties from the old version to the new one, including any UITypeEditor properties of custom properties which have their custom editors.
4. Install the new assembly to the GAC.
5. Create a policy assembly redirecting the old version to the new one and install it in GAC. For example of how to do that see here: http://samples.gotdotnet.com/quickstart/howto/doc/pubpolicy.aspx
Now when you open packages with the old version the pattern above will automatically upgrade to the new version.
Milen
sql
No comments:
Post a Comment