Solved

deploy a DLL

Posted on 2011-09-30
8
330 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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now