Welcome to MSSQL Forum!
MSSQL Forum - Discussions about Microsoft SQL Server

You are currently viewing our community forums as a guest user. Sign up or
Having an account grants you additional privileges, such as creating and participating in discussions.

Deploying a DLL to the Global Assembly Cache

Discussion in 'General programming' started by Peter Schmitz, Jul 4, 2017.

  1. Peter Schmitz

    Peter Schmitz Administrator Staff Member

    If you are going to be using third-party (or your own) DLLs from inside SSIS, you will have to ensure the DLL is registered on your target server(s). This article is meant to describe how to do this.

    First, find the DLL you need. For the sake of this article, let's assume we have grabbed a copy of the RabbitMQClient dll. The dll will be placed in c:\temp on the server we want to install it on.

    Connect to the server by means of an RDP or MSTSC session, and click the start button. Browse to your installation of Visual Studio, and find the folder called "Visual Studio Tools". In there, you should be able to find the Developer Command Prompt. Right-click on that, and select to run it as an administrator.

    It is possible this folder is empty on your machine, and thus the Developer Command Prompt is not available. With a bit of luck, the path to gcautil is added to your Environment Path, meaning you can simply type gcautil in the prompt window, and receive something other than a message that the file cannot be found.

    If you're not so lucky, the error you receive could be:

    This means you will have to figure out where the Global Assembly Cache util (gcautil.exe) is located on your system, and start a regular command prompt as an administrator. You will then have to supply the path to gcautil for the next step.

    Once you have a prompt opened, type the following command to register the dll to the Global Assembly Cache:

    Code (text):
    gacutil /i c:\Temp\RabbitMQ.Client.dll
    Hopefully you will see a message that the registration worked:

    upload_2017-7-4_13-17-11.png

    To verify the DLL was registered, you can issue the following command:

    Code (text):

    Gacutil /l RabbitMQ.Client
     
    This should show you output confirming the DLL exists:

    upload_2017-7-4_13-15-45.png

Share This Page