Results 1 to 5 of 5

Thread: Referencing custom DLLs.

  1. #1
    Hyperactive Member
    Join Date
    Jun 07
    Posts
    403

    Question Referencing custom DLLs.

    Hi,

    I developed a few Class Library Projects and compiled to DLLs. These libraries serves as a standard library that anyone here will be required to add in their succeeding projects.

    On the server/production machine, I have copied these DLLs in a specify folder "C:\Application\bin\".

    I've created a project that will be used as a template by other developers. This project already has these DLLs referenced and DLLs are on the output directory of the project. So I zip this project and send it to our developers.

    Now when we try to create a new project based on this template, its working locally. But when I copy the .exe compiled file of this project to our server and run it, it gives out an error about an assembly missing which I'm assuming is because it is looking for the assembly on the same folder as the exe file. What can we do so that the exe will reference the DLLs from the folder "C:\Application\bin"?

    I've read about the GAC but we don't want the DLLs in the C:\System\Assembly directory. We want to put them on our on directory.

    Thanks.

    VB Version: Microsoft Visual Studio 2008 Professional Edition
    .NET Version: Microsoft .NET Framework Version 3.5
    OS: Windows XP SP3

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,793

    Re: Referencing custom DLLs.

    You don't put DLLs in the output folder. The IDE does that. The DLLs should be somewhere else. Perhaps you could add a Libraries folder to the project or the like. You then reference the DLLs in that location and set the Copy Local property of the reference to True. When you build, the DLLs will be copied from the original location to the output folder. When you deploy, you installer will pick up the DLLs along with the EXE from the output folder or, if you're using XCOPY, you copy them yourself.

  3. #3
    Hyperactive Member
    Join Date
    Jun 07
    Posts
    403

    Re: Referencing custom DLLs.

    Thanks jmcilhinney. I will try this out.

    VB Version: Microsoft Visual Studio 2008 Professional Edition
    .NET Version: Microsoft .NET Framework Version 3.5
    OS: Windows XP SP3

  4. #4
    Hyperactive Member
    Join Date
    Jun 07
    Posts
    403

    Re: Referencing custom DLLs.

    After a few minutes of trying, it seems that it is not possible to reference a folder in a project. I can create a new folder and copy the dll on it but then it wouldn't be shared across other developers. It will only be available for this project still.

    VB Version: Microsoft Visual Studio 2008 Professional Edition
    .NET Version: Microsoft .NET Framework Version 3.5
    OS: Windows XP SP3

  5. #5
    .NUT jmcilhinney's Avatar
    Join Date
    May 05
    Location
    Sydney, Australia
    Posts
    80,793

    Re: Referencing custom DLLs.

    When we add a project to source control, we usually have a 'src' folder that contains the solution and a 'dlls' folder that contains external references and they are both under the 'trunk' folder in SVN.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •