Forums

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for .NET (v7.x)  /  Generate PDFs in SSIS Package

Forum Thread - Generate PDFs in SSIS Package

 Jan 24 2018 9:01 AM
Have had a vb.net app running for years generating PDFs. Trying to convert it to an SSIS package and generate the PDF's inside a script task. The job runs fine on my PC but when I deploy to the server it fails telling me Exception has been thrown by the target of invocation. This same server is where the vb app has been running.

Built the SSIS package in VS 2015 for a SQL 2014 box. The job has been set to run on SQL 2014.

Any thoughts?
 Jan 24 2018 4:04 PM
Posted by a ceTe Software moderator
Hello,

In general, a common cause of the error “Exception has been thrown by the target of invocation” is if you use the dll that targets one .NET framework version with another. For example, using ceTe.DynamicPDF.20.dll that targets .NET 2.0 in a .NET 4.0 environment or vice versa may result in this error. Check the .NET framework version that your application and make sure you use the appropriate dlls for that .NET environment.

If this error happens with SQL server SSIS package, try registering the dll in GAC.

Thanks,
ceTe Software Support Team.
 Jan 24 2018 4:06 PM
As it turns out the problem was that the DLL wasn't registered in the GAC. As soon as I did that, the package ran like a champ!

All times are US Eastern Standard time. The time now is 7:21 AM.