473,383 Members | 1,862 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,383 software developers and data experts.

DLL & Configuration File

Dan
Is there a way to use a config file in a DLL? I have built
a C# class that I want to compile as its own dll for use
in other projects. However, it needs to be able to get
some settings from a config file. When I compile it the
config file does not show up in the bin directory.

Any help would be appreciated. Thanks!
Nov 15 '05 #1
2 2066
Dan,

DLL files do not have config files. The config file is meant to be an
application-wide settings file. If you want to have your own configuration
file, then you will have to create the mechanism yourself to access it and
read the values from it.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Dan" <dd*****@fnisolutions.com> wrote in message
news:06****************************@phx.gbl...
Is there a way to use a config file in a DLL? I have built
a C# class that I want to compile as its own dll for use
in other projects. However, it needs to be able to get
some settings from a config file. When I compile it the
config file does not show up in the bin directory.

Any help would be appreciated. Thanks!

Nov 15 '05 #2
>Is there a way to use a config file in a DLL? I have built
a C# class that I want to compile as its own dll for use
in other projects. However, it needs to be able to get
some settings from a config file. When I compile it the
config file does not show up in the bin directory.


Not out of the box, no - the config files are only intended for
applications.

Which is really stupid, in a way - I might implement a DLL which has
quite a bit of functionality, and I'd really like to add a config file
to that assembly, right?

Well, there's help in the form of third-party components, such as:

http://www.codeproject.com/csharp/Cu...ile_Reader.asp

Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
Nov 15 '05 #3

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

Similar topics

0
by: roy | last post by:
I try to call com written in VB 6.0. When I use VS.net Studio to do the debuging, some time it works fine, some time I got the following message: Server Error in '/GISOnlineReservation'...
5
by: terry | last post by:
Hi, Question: When using Framesets and Server.Transfer in the Application_Error event handler is there a mechanism to get the error page to display in the total view of the browser not just in...
0
by: decker | last post by:
For a while now, I have been accustomed to defining my application's configuration values in the application configuration file in a custom section. In the implementation of my...
7
by: Mike Livenspargar | last post by:
We have an application converted from v1.1 Framework to v2.0. The executable references a class library which in turn has a web reference. The web reference 'URL Behavior' is set to dynamic. We...
17
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into...
0
by: Felix | last post by:
Ok, I've had this issues since yesterday and I cannot figure out what's causing it. Basically, I have a Visual Studio 2005 Web Service. The service runs completely find on my local development...
1
by: Max | last post by:
hi i have stored my connction string in web.config as we do usually. code of web.confing is given below. check the password field contain "&" character. now when i run my application it gives...
4
by: Brad Baker | last post by:
I'm trying to implement a gridview control using atlas & asp.net per the following article: http://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx My frustration is that the page I've...
2
by: david | last post by:
I have recently been trying to develop a website using ASP.Net 2.0 and then deploying the application on Easyspace. I use the publish website option within Visual Studio 2005, this works fine,...
1
by: Coaster | last post by:
orig ref here http://groups.google.com/group/microsoft.public.dotnet.framework.aspnet/browse_thread/thread/ff29cc370678911d/c0db5b7e3da283b9?lnk=st&q=gac+assembly+new+version&rnum=7#c0db5b7e3da283b9...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.