473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

GAC vs *.exe.config (and %path%)

Hi,

suppose I want to make a .NET dll and a .NET exe that needs this dll.
If I do not want to put the dll in the same folder as the exe: do I
have to use GAC or a *.exe.config file? Are there other solutions
(putting the dll in the path does not seem to work)?

Suppose I want to distribute the dll to users (the users, also, will
not use the same folder) and the source code to the exe to let them
build stuff on their own - what is the best solution: GAC or
*.exe.config or some other solution?

Thanks,
Per Erik Strandberg

----------------------------

"It is white."
-George W. Bush, asked by a child in Britain what the White House was
like.

Jan 30 '07 #1
1 2073
If dll's will be shared amoung more than one app on a machine then GAC them.
this is what the GAC is for.
If the dlls are only for use in one app then you can put them in the bin
folder (or use the config [or potential manifest, i cant remember now] to
redirect the assembly prober to look in other places.). You can still GAC
them for a single app.
In real world terms, control libraries and things for developers should be
GAC'd as you/they may want to install new versions but also keep using the
old versions sometimes. For dlls like business layer dlls or things like that
for a fat client app, use the bin folder as the app will always want the
newest version.

HTH

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"per9000" wrote:
Hi,

suppose I want to make a .NET dll and a .NET exe that needs this dll.
If I do not want to put the dll in the same folder as the exe: do I
have to use GAC or a *.exe.config file? Are there other solutions
(putting the dll in the path does not seem to work)?

Suppose I want to distribute the dll to users (the users, also, will
not use the same folder) and the source code to the exe to let them
build stuff on their own - what is the best solution: GAC or
*.exe.config or some other solution?

Thanks,
Per Erik Strandberg

----------------------------

"It is white."
-George W. Bush, asked by a child in Britain what the White House was
like.

Jan 30 '07 #2

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

Similar topics

13
by: gaudetteje | last post by:
Hi All, I've been trying to come up with an elegant solution to this problem, but can't seem to think of anything better than my solution below. I have a Python program that needs to be...
0
by: Ant Corrie | last post by:
I am at a loss as to why this is not working. I am trying to setup a TextWriterTraceListener in my application config file and then execute the app from the network. I get a security exception...
2
by: Harshdeep Mehta | last post by:
Hi all gurus, Myself Harshdeep Mehta, you can call me Harsh. I struck up in a situation where I need to define relative path in Web.Config. I.e. suppose I have a "Export" named folder, besides...
1
by: Eric Sabine | last post by:
I am aware you can link to other .config files in your app.config but I am missing something. What does it take to get this to work? Sub Main() Dim appConfig As New AppSettingsReader...
5
by: Andrew | last post by:
Hi, I have a default.aspx which allows the user to choose between module Admin and module B. When the user clicks either one, he will be redirected to a FormsAuthentication login page. The...
8
by: theWizard1 | last post by:
Using Asp.NET 1.1, and C#. I have a directory for the website, and a directory under it named Secure. I have a web.config in each of the above directories. The web.config in the Secure...
2
by: job | last post by:
In a sharepoint setup using smartpart to load our user controls using enterprise blocks (data) we are getting some strange errors (logged to the event log). We dont get the error all the time. When...
2
by: Bragadiru | last post by:
Hi all, I want to add a new connection string to my webservice web.config file at runtime : ConnectionStringSettings connStringsSettings = new...
1
by: Magnus.Moraberg | last post by:
Hi, I have some Settings in my exe.config file, for example the path to my database. If the path to the database is changed, I wish to inform them that they can update this path via the...
2
by: =?Utf-8?B?YW5vbg==?= | last post by:
I am not sure if this is the right forum. Environment : Windows server 2008, IIS 7.0 I get the 'Could not load the file or assembly 'blowery.web.httpCompress' or one of its dependencies. The...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.