Re: Deploying with My DLLs

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



"jp2msft" <jp2msft@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:194FB8CC-F32C-480B-AD73-20937E6FAD0B@xxxxxxxxxxxxxxxx
I've created some DLLs for our projects, and I would like each project to
access the same DLLs.

In my Setup and Deployment project, after I add the primary output, I can
easily add the dependant DLL files.

As long as I keep the DLL files in the same directory as the primary output,
everything is roses (good).

If I try to create common folder or copy them to a Program Files > Common
Folder subfolder of mine, the DLLs can not be found after I install and try
to execute my application.

How do I tell setup that my primary output should look for its DLLs in some
other folder?

The "standard" way of creating shared DLLs in .Net is to install them to the GAC (Global Assembly Cache).
In order to be able to install the DLLs to the GAC, you first have to give them a Strong Name. This is well documented in various places, so a simple search will quickly tell you how to do this.
On your development workstation you can test the DLLs by dragging and dropping them to c:\windows\assembly using Windows Explorer. This installs the DLLs to the GAC, and you can verify that your various programs can use those DLLs from any folder.
In your Setup Project in Visual Studio, in the File System Editor, choose the option "Add Special Folder", select "Global Assembly Cache", and add there your DLLs. This will deploy the DLLs to the GAC when running Setup in the target machine.

.



Relevant Pages

  • Re: Use VS 2005 Setup project for VB 6 application
    ... There are a number of reasons why Dlls are not included in the setup, ... folder is part of the OS and you do not redistribute them, ... A VS 2005 setup project builds a standard MSI setup like most other tools ... I have a few of simple questions regarding VS 2005's setup Project. ...
    (microsoft.public.dotnet.framework.setup)
  • Re: Opening an Access database in Delphi
    ... >> to figure out which DLLs, etc. that I'd need to include with it. ... > included with the MDAC setup. ... The Jet redistributable can be found on ...
    (comp.lang.pascal.delphi.misc)
  • Registrierung von DLLS unter TerminalServer
    ... Dazu habe ich mit Inno Script ein Setup erstellt. ... Wo in der Registry werden VB6 Active X DLLs registriert? ... Prev by Date: ... Next by Date: ...
    (microsoft.public.de.vb)
  • Re: Hiiiiiiilfe, Betriebssystemwechsel :(((
    ... Warum erfordert das Setup einen Neustart von Windows? ... welche DLLs Du in Dein Setup aufnehmen _darfst_ und welche ... Prev by Date: ... Next by Date: ...
    (microsoft.public.de.vb)
  • Re: Verpackung und Weitergabe
    ... Ist eine solche in Deinem Setup enthalten, ... Beschädigung des betroffenen Systems, welches sich dann u.U. gar nicht mehr ... Ansonsten musst Du Dein Setup mal kritisch betrachten und sehen, ... Dateien (Dlls) darin enthalten sind. ...
    (microsoft.public.de.vb)