Solved

deploy a DLL

Posted on 2011-09-30
8
338 Views
Last Modified: 2012-06-27
I have signed an assembly, complied it, dragged the assembly to the GAC folder within the Setup project in my solution.

Now what?  If I want to deploy this DLL on a machine, now what?
0
Comment
Question by:HLRosenberger
  • 5
  • 3
8 Comments
 
LVL 40
ID: 36894439
Compile the Setup project.

This will generate a Setup.exe and an accompanying .msi file. Bring both to the target machine and run Setup.

Notice that because you ware installing your dll in the GAC, the user must be an administrator on the computer in order to perform the installation.

If that dll is used only by on application, it would be better to simply leave it in the appication folder. In .NET, this is the recommended place for a dll that is not shared by many application.
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 36895016
This DLL is shared by apps, so GAC is the way to go?
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 36895380
If you can get an administrator to install the application, yes.

Otherwise, the alternative is to install the dll in another directory and use a CodeBase instruction in the application configuration file to tell it where the dll is installed.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:HLRosenberger
ID: 36903120
OK. I made the setup project, compiled it, and ran the install.  I remove the DLL from my BIN directory for my main app.  Now, the app is broke, of course, and does not see the function in the DLL.  How do I get my app to reference the  instance of the DLL that is in/registered to the GAC?
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 36903127
Further question - I code classic VB for year.  I'm familiar with registering a DLL.  How much the same or different is putting a DLL into the GAC?
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 36903168
Also, after running the setup, and specifying a folder, I do not see that folder.  It was not created.  Should I not see my install folder and my DLL?
0
 
LVL 1

Author Comment

by:HLRosenberger
ID: 36903189
I should see my DLL in the .NET tab of the Add Reference dialog, correct?
0
 
LVL 40
ID: 36906747
To get the application to see the dll in the GAC.

It will do it automatically, but the dll needs to be the same name / same version / same signature.

-----

If a .NET dll is used only by .NET applications, you do not need to register it. The system will look for it first in the application directory (recommended), and if does not find there, it will look in the GAC. There are alternatives, but this is the default.

.NET dll need to be registered only when you want to access them from COM applications.

-----

If you do not see the folder after running setup, it means:

You might have to refresh Windows Explorer before you see the folder.

Something in wrong in your installation.

One thing is sure, you won't see the dll, because you have removed it from your bin directory.

-----

No, by default, you won't see the dll in the Add Reference, at least not in the .NET or COM tab.

One nice thing to do when you switch to .NET: Forget all you knew in VB6. .NET is different, Visual Studio is different, so nothing works the same as it did before. That is the price to pay to evolve. People you switched from a horse to a car had the same type of problems. And moving from VB6 to VB.NET is, in my opinion, as different as moving from a horse to a car.

In order to get your dll in the Add Reference dialog, you need to store it in a very specific directory on the hard disk or make 3 or 4 entries in Windows Registry.

Most programmers do not do that. When they need to reference their own dlls, they do it through the Browse tab of the Reference window. An alternative, depending on how you work, is to first add the dll to your solution and reference it through the Project tab of the Reference window. Personnally, since I do not work in team, I prefer the latter, because it enables me to always have the source code and the last copy of the dll in my applications development environment.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question