473,404 Members | 2,137 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,404 software developers and data experts.

Simple question with config file

Dear all,

I am developing a multi tiers application and actually responsible of
delivering the buines logic library.
That buisnes logic library will need some parameters to be suitebale
configured. As a testing purpose I have build a client application which
contains app.config files with paramters for this libary. Everything works as
expected.

Now the question is that I do not want to place library parmeters with the
UI application because I would like to deliver the buislness logic and it's
configuration as a set.

The question I have is , is it possible to get a configuration file attached
to a libray ?
Example :
library name could be : myLib.dll
config file could be : myLib.dll.config

If this is possible how to located the config file at the place the libary
will be loaded ?

Thanks for help
regards
serge
May 29 '07 #1
1 1313
The file location of the running assembly can be retrieved using reflection.
This VB.NET code will get the file location of the currently running
assembly:

System.Reflection.GetExecutingAssembly.Location

Then, you can concatenate ".config" to the end.

Hope this helps,
Andrew

"calderara" <ca*******@discussions.microsoft.comwrote in message
news:E5**********************************@microsof t.com...
Dear all,

I am developing a multi tiers application and actually responsible of
delivering the buines logic library.
That buisnes logic library will need some parameters to be suitebale
configured. As a testing purpose I have build a client application which
contains app.config files with paramters for this libary. Everything works
as
expected.

Now the question is that I do not want to place library parmeters with the
UI application because I would like to deliver the buislness logic and
it's
configuration as a set.

The question I have is , is it possible to get a configuration file
attached
to a libray ?
Example :
library name could be : myLib.dll
config file could be : myLib.dll.config

If this is possible how to located the config file at the place the libary
will be loaded ?

Thanks for help
regards
serge
May 29 '07 #2

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

Similar topics

4
by: Fuzzyman | last post by:
There have been a couple of config file 'systems' announced recently, that focus on building more powerful and complex configuration files. ConfigObj is a module to enable you to much more *simply*...
8
by: DAMAR | last post by:
I have forgotten how to write that simple thing: I have app.exe.config file with my custom section where I initialize a variable used then in application. User can chande a value of this variable...
4
by: Simon Harvey | last post by:
Hi chaps, Can someone tell me the following: If I declare a site wide config file and then want to overide it in a secure directory, do I need to have a complete config file, or can I just...
2
by: kj | last post by:
I'm sure this is a simple, but recurrent, problem for which I can't hit on a totally satisfactory solution. As an example, suppose that I want write a module X that performs some database...
2
by: =?Utf-8?B?d3VyemVsQ2lkZXJtYWtlcg==?= | last post by:
I have created a very simple C# class library (DLL). I have ticked the "Register for COM interop" option in the project properties dialog. I have made the in the AssemblyInfo.cs file. I...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...

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.