Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

deploy a DLL

Posted on 2011-09-30
8
Medium Priority
?
350 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 2000 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
Independent Software Vendors: 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!

 
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

Industry Leaders: 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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline

824 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