简体   繁体   中英

Could not load file or assembly SSIS Script Task

I have a DTSx with a Script Task that will replace some labels in a Word Document and then save it as PDF but it constantly shows error: "Could not load file or assembly '' or one of its dependencies. The system cannot find the file specified." I've tried using Aspose, GemBox, Syncfusion and the error is always the same. When I use them from NuGet the Task doesn't even start...but when I copy the DLLs and all the attached files to a folder in my computer it shows the error above. I use framework 4.

Can you please help?

Thanks.

nuget packages and SSIS script tasks don't work. Yes, it will compile for you but when you X out of the Script Editor, the nuget packages don't get serialized in with the executable and when it runs, there's no "brains" there to download the expected assemblies. SSIS expects the assemblies to be either serialized into what gets stored in the SSIS package or to be in the Global Assembly Cache (GAC).

I found a similar issue when working with sftp and the below steps helped me out and resolved in vs2017 community with SSIS package.

  1. Open PowerShell and run as administrator.
  2. Download the respective.dll file from Nuget package and copy the below commands in PowerShell.
  3. [System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a") $publish = New-Object System.EnterpriseServices.Internal.Publish $publish.GacInstall("C:\Users\hp\Downloads\renci.ss.net\renci.ss.net.dll");
  4. Run the above command by replacing the downloaded.dll filepath. Press enter
  5. Gac turns true.Run script task in SSIS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM