Is there any way to update .net framework version for all script task at once?

402 Views Asked by At

I need to update script tasks to use 4.6 framework version for multiple packages. Is there anyway to upgrade framework version at once than going to each script task and updating one by one?

1

There are 1 best solutions below

0
billinkc On

No, there's no magic button to change the definition of your existing scripts.

You could conceivably write a custom .NET application that emulates the behaviour of opening the script task/component which of course spawns an instance of VS to edit the script and then update the TargetFrameworkVersion to 4.6, save the updated project, serialize it back into the SSIS object model and save the resulting package. The complexity of that versus brute force fixing all the packages manually is going to weigh heavily toward manual effort. Future readers, please prove me wrong here as I think that'd be a neat trick.

Going forward, you can change the definition of new Script Component/Tasks to use Framework 4.6 (or 4.7, 4.8). In my post on Slimming down the Script Task, we can see that somewhere on your filesystem is a VSTA??_IS_ST_CS_Template.vstax (where ?? is a two digit number). For my box, VS 2017, SSDT 15, I have VSTA14_IS_ST_CS_Template.vstax.

If I

  • unzip that,
  • edit line 14 of IS%20Script%20Task%20Project.csproj to go from <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> to <TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
  • Save it
  • zip that all back up as VSTA14_IS_ST_CS_Template.vstax
  • replace the original vstax file with our modified one

Creating a new Script Task will target the 4.6 framework. Apply the vstax file to all of your coworkers.