To add the assembly to the Global Assembly Cache

In this section, you add the assembly to the Global Assembly Cache (GAC).

  1. In Windows Explorer, locate the project on your machine.

    The location of your projects folder will depend on the version of Visual Studio that you have installed.

    • For Visual Studio .Net 2003, projects can be found at \My Documents\Visual Studio Projects.

    • For Visual Studio 2005, projects can be found at\My Documents\Visual Studio 2005\Projects.

    • For Visual Studio 2008, projects can be found at\My Documents\Visual Studio 2008\Projects.

  2. Within the project that you have created, locate the subdirectory \bin\Debug\. Confirm that the assembly DLL is located in this directory.

  3. Copy the file directory path of the DLL to the clipboard.

  4. Click Start, point to Programs > Microsoft Visual Studio > Visual Studio Tools, and then click Visual Studio Command Prompt.

  5. You need to change directory to the directory containing your DLL. To do this, begin by typing the change directory command:

    cd 
    
  6. Add a space after the cd command, and then right-click to paste the directory file path from the clipboard.

  7. Press Enter.

Verify that the directory has changed to the directory that contains the assembly DLL.
  1. Type the following command, and replace the assembly DLL shown in the code snippet with the name of your assembly DLL.

    gacutil -if CRUFL_CS_ExchangeRate.dll
    
  2. Press Enter.

    A message telling you that the assembly has been added to the cache should appear. If a failure message appears, recheck the spelling of the assembly DLL filename and run gacutil again.

  3. Close Visual Studio Command Prompt.

  4. In Windows Explorer, locate the subdirectory \assembly\, which is within the \Windows\ or \WinNT\ directory.

The assembly you added should now be visible in the assembly subdirectory (known as the GAC, or Global Assembly Cache.)

You are now ready to create a Crystal report that accesses this custom function.