Solved

deploy a DLL

Posted on 2011-09-30
8
340 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

630 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