Query about GAC (Global Assembly Cache)

  • Hi everyone,

    So I have a SSIS package that performs some importing/exporting from MySQL database. This SSIS package uses code written in Script Task C#. To make connectivity to MySQL server, I have used MySql.Data Nuget package.

    When I installed this Nuget package I had to manually add "MySql.Data.dll" file into GAC otherwise there were errors. I manually opened "Developer Command Prompt for VS 2019" by selecting Run as Administrator and ran following command:

    "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\gacutil.exe" /i "D:\dll_files\MySql.Data.dll"

    After that my SSIS package started running successfully.

    But now I have deployed this SSIS package to another machine using File system deployment and I got this error:

    ErrorMessage: Could not load file or assembly 'MySql.Data, Version=8.0.32.0, Culture=neutral, PublicKeyToken=c5687fc8896' or one of its dependencies. The system cannot find the file specified.
    ExceptionDetails: System.IO.FileNotFoundException: Could not load file or assembly 'MySql.Data, Version=8.0.32.0, Culture=neutral, PublicKeyToken=c5687fc8896' or one of its dependencies. The system cannot find the file specified.

    File name: 'MySql.Data, Version=8.0.32.0, Culture=neutral, PublicKeyToken=c5687fc8896'
    at ST_c189189146e94be29bcb984b62355c9a.ScriptMain.method20240206_createDBandTables()
    at ST_c189189146e94be29bcb984b62355c9a.ScriptMain.Main()

    WRN: Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

    Now for this machine I can do same and do all the work manually. Place dll files in a folder and then open command prompt and run the command, but this would be a problem if I have to do this every time I deploy the ssis package to a new machine.

    So my question is how can I add these nuget/dll files into ".SSISDeploymentManifest" and install them automatically when I am deploying the package?

    Regards

  • So my question is how can I add these nuget/dll files into ".SSISDeploymentManifest" and install them automatically when I am deploying the package?

    As far as I know, you cannot. Adding the assembly to the GAC is a separate process, to be performed in addition to the package deployment.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

  • Phil Parkin wrote:

    So my question is how can I add these nuget/dll files into ".SSISDeploymentManifest" and install them automatically when I am deploying the package?

    As far as I know, you cannot. Adding the assembly to the GAC is a separate process, to be performed in addition to the package deployment.

     

    What if I transfer my code from SSIS script task into C# Console App? Will it cause problem like these in deployments?

  • You mean build a completely separate app and simply call that from SSIS using an Execute Process task? That should work just fine.

    • This reply was modified 6 months, 1 week ago by  Phil Parkin.

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply