Solved

deploy a DLL

Posted on 2011-09-30
8
339 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
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…

752 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