473,473 Members | 1,984 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Referencing DLLs to distribute

I am kinda new to the whole distribution process.

I several programs that I am writing that use common .NET DLLs. I want
each program to use the same DLLs in a "COMMON" folder. How do I get
the released build to reference those DLLs?

The debug version works fine (within the VS Environment).

Thanks,
Doug

Nov 17 '05 #1
10 2262
Doug,

You need to keep the common DLLs in the same folder as the release EXE.
Another option would be to install the common DLLs into the Global
Assembly Cache, but this makes deployment slightly more complicated.

You may want to check into creating a Setup and Deployment project;
this will allow you to build a simple MSI for distributing your
application.

HTH
Andy

Nov 17 '05 #2
You mean to have a copy of the DLL for each EXE that I am writing?
Seems like kind of a waste of space. I was hoping to have a common
directory.

Thanks,
Doug

Nov 17 '05 #3

You can reference .dlls in a common folder by adding "codeBase" elements to
the app/web.config file(s) for your projects:

http://msdn.microsoft.com/library/de...rfCodeBase.asp

"Doug Crabtree" wrote:
I am kinda new to the whole distribution process.

I several programs that I am writing that use common .NET DLLs. I want
each program to use the same DLLs in a "COMMON" folder. How do I get
the released build to reference those DLLs?

The debug version works fine (within the VS Environment).

Thanks,
Doug

Nov 17 '05 #4
Yes. Are the release versions of your assemblies large? Space
shouldn't really be an issue.

If you really want to, you can deploy the assemblies to the Global
Assembly Cache, but you may run into other problems there. For
starters, your assembly must be signed with a strong name.

Secondly, if you deploy an updated version of your assembly, any
existing programs will continue to use the OLD version (since you ARE
allowed to have multiple versions of an assembly within the GAC)
unless you change your .config file to redirect to the newest version.

While you're developing though there's no reason you can't store your
release DLLs on a share somewhere and have your projects reference
those. Thats what i do here, to ensure i'm always building against the
latest version of an assembly.

Andy

Nov 17 '05 #5
I know you've had other answers but just as a sanity check... Are you
thinking of the .NET DLL's in a common folder??

If this is the case and you are trying to figure out how to redistribute the
framework, stop now. The framework DLL's are contained in the Global
Assembly Cache (GAC) and willl be referenced automatically by the CLR.

For your own DLL's that you might create as a part of your project,
distribute them in the application directory OR, if you have several
applications that depend on the same DLL's, strong-name them and put them in
the GAC.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Doug Crabtree" <dj******@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I am kinda new to the whole distribution process.

I several programs that I am writing that use common .NET DLLs. I want
each program to use the same DLLs in a "COMMON" folder. How do I get
the released build to reference those DLLs?

The debug version works fine (within the VS Environment).

Thanks,
Doug

Nov 17 '05 #6
NO! the DLL's are already in a system folder called the Global Assembly
Cache. .NET applications declare which version of a DLL must be used and the
runtime manager, the CLR, will dynamically link the correct version DLL for
you. You do not need to redistribute bits of the framework with your
application.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Doug Crabtree" <dj******@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
You mean to have a copy of the DLL for each EXE that I am writing?
Seems like kind of a waste of space. I was hoping to have a common
directory.

Thanks,
Doug

Nov 17 '05 #7
Bob,

Just to be clear, I'm assuming Doug is talking about assemblies he
himself is building, not assemblies that are part of the .Net
framework.

Andy

Nov 17 '05 #8
You are correct. I have several applications that use the same custom
DLLs over and over again. Just didn't want to have have them in all of
the directories. They are not large, and I don't want the headache of
the GAC. Maybe I will just have all the EXEs in the same directory,
since I will have to rebuild all of them each time I change the base
DLLs.

Thanks,
Doug

Nov 17 '05 #9
If tthese are your own DLL's and they span applications take 5 minutes to
strong name them and install them in the GAC.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Doug Crabtree" <dj******@hotmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
You are correct. I have several applications that use the same custom
DLLs over and over again. Just didn't want to have have them in all of
the directories. They are not large, and I don't want the headache of
the GAC. Maybe I will just have all the EXEs in the same directory,
since I will have to rebuild all of them each time I change the base
DLLs.

Thanks,
Doug

Nov 17 '05 #10
hello

Nov 17 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Jon | last post by:
I have 3 VB.net executables that reference the same 3 VB.Net DLLs. How is the best way to distribute the EXEs without putting 3 copies of of DLL on a user's machine. I looked into Private...
4
by: Oenone | last post by:
Another VB6 feature that I'm missing in VB.NET is with regard to referencing projects vs. referencing DLLs. In VB6 I can reference my support library, Support.dll, and call its functions. If...
6
by: Brian Bischof | last post by:
I'm having troubles getting the debugging process to work consistenly for external classes. I got it to work once and then I turned it off. But now I can't get re-enabled. Here is what I'm doing....
3
by: eduwushu | last post by:
Hi there. Im developing a c# app and i have a solution with some projects: the main project which generates the executable file and some other projects which some of them im compiling generate...
3
by: =?Utf-8?B?a3lvbmc=?= | last post by:
Quick question. Say I have a project against the 2.0framework. I also have a dll compiled against 3.5. If I reference the 3.5 dll in the 2.0 project, how would that work? So I'm thinking that...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.