Anand Prakash

While Creating a script task in Control Flow, I am getting "Package Validation Error". Here is the complete message:

Error at Validate File and Load Data: The task is configured to pre-compile the script, but binary code is not found. Please visit the IDE in Script Task Editor by clicking Design Script button to cause binary code to be generated.

As mentioned in the message, I opened the script IDE and added the code I need. When I close the VSA IDE, package designer displays the same error message.

The worst part of whole story is that if I close the package designer and reopen it, I find that all the code I wrote in the script task has been deleted by the package designer. This is not at all acceptable as I saved the package the and still lost all my work. I did all the coding from scratch for that task.

Please respond if anyone faced similar problem.

Thanks in advance!


PS: If any one from Microsoft is reading this, please see what you guys are coding there. Due to the buggy software you deliver, I am loosing my credibility.

<P< P>

Re: Package Validation Error : The package designer deletes the code from script task.

Duane Douglas

a bug report may be submitted here: SiteID=68

Re: Package Validation Error : The package designer deletes the code from script task.

Anand Prakash

Well, I figured out the problem for this issue.

If there is any compilation error in the code you have written in the script designer for the Script Task, you will get this irrelevant error message and the code will be deleted if you close the package designer.

So, if you get an error message as mentioned in the original post, please check the Script Task code for compilation errors (sorry, this has to be done manually as script designer doesn't notify about compilation errors) before closing the Package designer otherwise all the code in script task will be lost.

Suggested Fixes:
Still, there are two things which need attention from SSIS team.

1. The code editor should give a an error during compilation if it fails. Which it does not do now in SQL Server 2005 SP1. This is important as one can easily miss a closing parenthesis (or any typo errors). The probability increases with the number of lines of code. If at all we can not do this in code editor due to constraint as we are using the common VBA editor, the message which SSIS displays, should be relevant to the problem.

2. The designer must not delete the code even if there is compilation errors. One may want to leave the code as is (with errors) and prefer to fix it later.

I hope this will help.


Re: Package Validation Error : The package designer deletes the code from script task.

Tito Jermaine

I have a similar issue when I open a package from the file system using SMO and then save the package back to the file system (same filename). All of the settings and the script itself disappear from the Script Task. I haven't been able to verify if the issue is isolated to just packages on the file system or if it affects the other package stores as well. I'm able to open, close, and execute the package from BIDS with no problems, it's only when using SMO. I also tried setting the precompile option to true to see if that would help, but doesn't make a difference.