Recently one of my old clients contacted me for an error execution via SQL Agent Job. They informed that it runs fine when they invoke the package from Visual Studio (SSDT). In this blog post, we will discuss Exception While Loading Script Task from XML.
Here is the error which was seen in SSISDB reports via management studio.
Script Task 1:Error: There was an exception while loading Script Task from XML: System.Exception: The Script Task “ST_24802bd6f41940e0befad660c2cba337” uses version 15.0 script that is not supported in this release of Integration Services. To run the package, use the Script Task to create a new VSTA script. In most cases, scripts are converted automatically to use a supported version, when you open a SQL Server Integration Services package in %SQL_PRODUCT_SHORT_NAME% Integration Services. at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)
The error message is good enough in telling the cause. The script task version is 15.0 and SQL SSIS version is not compatible. Our target version was SQL Server 2016.
WORKAROUND/SOLUTION
When I checked various version, I found that the SSIS package was developed with Azure features packs on SSDT 2017. Since we are deploying it in SQL server 2016 and running via agent job, it is throwing an error.
To fix the problem, all we needed to do was change the TargetServerVersion values under project properties as shown below.
Have you encountered a similar error? Please comment and let me know if you found some other solution?
Reference:Â Pinal Dave (https://blog.sqlauthority.com)
5 Comments. Leave new
Hi Pinal, thanks for all the solutions you posting on your blog, they are very useful.
I’m getting the same error that you mentioning here, the problem is that the SSIS package I’m troubleshooting is a File System package and can’t get the option to select TargetServerOption.
Basically the package isn’t under any project when opening it with Visual Studio, and in turn cannot see project properties. Any advise on that?
Any solution to this? I have same issue.
Hey,
I am facing a similar problem where I created a package in visula studio 2017 and the package was executing successfully. I saved the package in our STAGE file system and created a job in SSMS 2017 to run against the package. I get the same error as above. I even changed the targetversion to SQL Server 2016, then I get the message
Description: Exception has been thrown by the target of an invocation.
When I tried to execute the package in visual studio itself after changing the version I get this kind of error. But when I changed the version back to SQL Server 2017, it works fine again.
ANy help is appreciated.
Hi Iam getting out of memory exception in script task Can I know how can we solve this…
Hello,
I have the same problem, I currently have my ETL in VS2019 and SQL2022. When I run it, I get an error in the Script Task.
I followed the advice to change the “Deployment Target Version” to 2019, but my connections to the files, both source and destination, give me the connection error. I have tried to make the connections again, but without success.
Someone who has had the same thing happen to them and has found the solution.