Can a class library have a app.config file. Reason for asking is that the
microsoft application blocks all read from myApp.exe.config. How can you use
the application blocks if you do not have an app.config file.
Wish someone from microsoft would answer this, I am at a loss.
thanks
grs 4 7853
Yes, a class library can have .config file, but you have to do the
copying and naming by hand. Visual Studio only renames and copies
app.config files automatically for you.
As you already found, that behavior is not really documented and the
expected usage is to add settings for the application blocks to the
app.config/web.config file of your application. As a developer/vendor of
a class library, you need to document these expectations when you only
ship a library, which is what Microsoft does with WSE for example.
What exactly are you looking to do?
HTH,
Christoph Schittko
MS MVP XML http://weblogs.asp.net/cschittko -----Original Message----- From: grs [mailto:gs****@budgetext.com] Posted At: Monday, November 15, 2004 1:57 PM Posted To: microsoft.public.dotnet.xml Conversation: app.config xml file and application blocks Subject: app.config xml file and application blocks
Can a class library have a app.config file. Reason for asking is that
the microsoft application blocks all read from myApp.exe.config. How can
you use the application blocks if you do not have an app.config file.
Wish someone from microsoft would answer this, I am at a loss.
thanks grs
Christoph,
thanks for reply. "What exactly are you looking to do?" = I wish to use the
exception management application block in a class library. Would the
application block read the config settings - what would I name the config
file ?? Any example would really would be appreciated.
thanks
grs
"Christoph Schittko [MVP]" <IN**********@austin.rr.com> wrote in message
news:O9**************@TK2MSFTNGP14.phx.gbl... Yes, a class library can have .config file, but you have to do the copying and naming by hand. Visual Studio only renames and copies app.config files automatically for you.
As you already found, that behavior is not really documented and the expected usage is to add settings for the application blocks to the app.config/web.config file of your application. As a developer/vendor of a class library, you need to document these expectations when you only ship a library, which is what Microsoft does with WSE for example.
What exactly are you looking to do?
HTH, Christoph Schittko MS MVP XML http://weblogs.asp.net/cschittko
-----Original Message----- From: grs [mailto:gs****@budgetext.com] Posted At: Monday, November 15, 2004 1:57 PM Posted To: microsoft.public.dotnet.xml Conversation: app.config xml file and application blocks Subject: app.config xml file and application blocks
Can a class library have a app.config file. Reason for asking is that the microsoft application blocks all read from myApp.exe.config. How can you use the application blocks if you do not have an app.config file.
Wish someone from microsoft would answer this, I am at a loss.
thanks grs
I swear I loaded .dll.config files before for assemblies back in the
..net 1.0 days but I guess it wasn't intended behavior and it's no longer
working.
To use the exception management block you need to add the required
configuration elements in the app.config or the web.config file of the
executing application or web service.
If you don't build that app.config file because you're using the
exception management block in a class library assembly, not in an
application, then you need to document that requirement for the
developers that consume your class library.
I apologize for any confusion.
Christoph -----Original Message----- From: grs [mailto:gs****@budgetext.com] Posted At: Monday, November 15, 2004 3:43 PM Posted To: microsoft.public.dotnet.xml Conversation: app.config xml file and application blocks Subject: Re: app.config xml file and application blocks
Christoph, thanks for reply. "What exactly are you looking to do?" = I wish to
use the exception management application block in a class library. Would the application block read the config settings - what would I name the
config file ?? Any example would really would be appreciated.
thanks grs
"Christoph Schittko [MVP]" <IN**********@austin.rr.com> wrote in
message news:O9**************@TK2MSFTNGP14.phx.gbl... Yes, a class library can have .config file, but you have to do the copying and naming by hand. Visual Studio only renames and copies app.config files automatically for you.
As you already found, that behavior is not really documented and the expected usage is to add settings for the application blocks to the app.config/web.config file of your application. As a
developer/vendor of a class library, you need to document these expectations when you
only ship a library, which is what Microsoft does with WSE for example.
What exactly are you looking to do?
HTH, Christoph Schittko MS MVP XML http://weblogs.asp.net/cschittko
-----Original Message----- From: grs [mailto:gs****@budgetext.com] Posted At: Monday, November 15, 2004 1:57 PM Posted To: microsoft.public.dotnet.xml Conversation: app.config xml file and application blocks Subject: app.config xml file and application blocks
Can a class library have a app.config file. Reason for asking is
that the microsoft application blocks all read from myApp.exe.config. How
can you use the application blocks if you do not have an app.config file.
Wish someone from microsoft would answer this, I am at a loss.
thanks grs
>Yes, a class library can have .config file,
Well, sort of - but the basic ConfigurationSettings object will *NOT*
look at an class library's "app.config" file - it will only ever look
at the app's "myapp.exe.config" file.
So if you want to use a config file for a DLL or something like that,
you have to do all the evaluation of the XML config file yourself.
Marc
================================================== ==============
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Mike |
last post by:
Hi
I am using one of the Microsoft building blocks called User Interface
Process what this block basically does it control the flow/state of your
application. This block works great with...
|
by: Mani |
last post by:
Problem Scenario:
I have copied the Microsoft Cache Application Block (MCAB) dll to GAC to make that available to other applications. The MCAB uses few configuration settings which will be set in...
|
by: keyway |
last post by:
We have recently implemented (enterprise library) data application blocks to
VB.NET console applications - very nice. The console apps read an app.config
file, which in turn communicates w/ a...
|
by: grs |
last post by:
Can a class library have a app.config file. Reason for asking is that the
microsoft application blocks all read from myApp.exe.config. How can you use
the application blocks if you do not have an...
|
by: Lokkju |
last post by:
I am pretty much lost here - I am trying to create a managed c++
wrapper for this dll, so that I can use it from c#/vb.net, however, it
does not conform to any standard style of coding I have seen....
|
by: Asela Gunawardena |
last post by:
we have a web site which operates as a seperate application that can be
integrated with other webs site developped to use other platforms such as
php, jsp, etc. so obivously we have our own...
|
by: SFM |
last post by:
Connection to several connection string from the app.config file
I am trying to find a why to get the providerMappings settings from the
app.config. For my data access I am using Data access...
|
by: Harold Howe |
last post by:
When .NET loads an app.config at runtime (myapp.exe.config), will it
honor an entity declaration? Based on what I am seeing, the answer is
no, but I think, or hope, that I am doing something wrong....
|
by: =?Utf-8?B?RXZl?= |
last post by:
Here's my App.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="customers">
<section name="test1"...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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: 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...
|
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...
|
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...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
| |