If I change my app.config file, nothing happens: The DB is accessed
like before.
No error, everything seems to work normal.
I rebuild my solution, even after restarting VS2005.
My questions:
1. When is the input of app.config taken? Why am I not seeing any
effect?
2. app.config appears in one project of my solution, I cannot se it
in the release version.
The data isn't in MyMain.exe.config
Where is the data stored?
Your config will be built into the the Bin directory of the current
project only. I'm currently dealing with the same problem and am
having to manually copy the "MyProject.dll.config" file to the Startup
project's Bin directory.
I wonder if someone else can shed light on a way to automatically
build the config file to the main project build directory.
On May 13, 8:07 pm, cppquester <cppques...@googlemail.com> wrote:
> If I change my app.config file, nothing happens: The DB is accessed
> like before.
> No error, everything seems to work normal.
> I rebuild my solution, even after restarting VS2005.
> My questions:
> 1. When is the input of app.config taken? Why am I not seeing any
> effect?
> 2. app.config appears in one project of my solution, I cannot se it
> in the release version.
> The data isn't in MyMain.exe.config
> Where is the data stored?
On Tue, May 13, 2008 at 1:10 PM, Cerebrus <zorg...@sify.com> wrote:
> Your config will be built into the the Bin directory of the current > project only. I'm currently dealing with the same problem and am > having to manually copy the "MyProject.dll.config" file to the Startup > project's Bin directory.
> I wonder if someone else can shed light on a way to automatically > build the config file to the main project build directory.
> On May 13, 8:07 pm, cppquester <cppques...@googlemail.com> wrote: > > If I change my app.config file, nothing happens: The DB is accessed > > like before. > > No error, everything seems to work normal. > > I rebuild my solution, even after restarting VS2005.
> > My questions: > > 1. When is the input of app.config taken? Why am I not seeing any > > effect?
> > 2. app.config appears in one project of my solution, I cannot se it > > in the release version. > > The data isn't in MyMain.exe.config > > Where is the data stored?
> I wonder if someone else can shed light on a way to automatically
> build the config file to the main project build directory.
Cerebrus - get away from your libraries having an "application" config
file. They are for, you guessed it, applications. If your library is
utterly dependent upon config information and you don't even have an
application then you've got to get into some fancy deployment
operations - like getting your config information into the host's
framework config.
On May 13, 7:16 pm, "Andrew Badera" <and...@badera.us> wrote:
> I'm having a hard time understanding the issue ... why do you have to fuddle
> around with the .config C? Educate me please!
> OP:
> .config files are read on startup/application pool recycle (I think)/web app
> recompile
I want to be able to change the DB connect string (DSN, name,
password). I think this information is in the
config file (of one project of my solution, actually I don't see the
information in the exe.config file of the program)
But there isn't any effect when I change it in the config file and
rebuild afterwards.
The program still uses the same DB.
> .config file sections can be manually refreshed using .RefreshSection()
> On Tue, May 13, 2008 at 1:10 PM, Cerebrus <zorg...@sify.com> wrote:
> > Your config will be built into the the Bin directory of the current
> > project only. I'm currently dealing with the same problem and am
> > having to manually copy the "MyProject.dll.config" file to the Startup
> > project's Bin directory.
> > I wonder if someone else can shed light on a way to automatically
> > build the config file to the main project build directory.
> > On May 13, 8:07 pm, cppquester <cppques...@googlemail.com> wrote:
> > > If I change my app.config file, nothing happens: The DB is accessed
> > > like before.
> > > No error, everything seems to work normal.
> > > I rebuild my solution, even after restarting VS2005.
> > > My questions:
> > > 1. When is the input of app.config taken? Why am I not seeing any
> > > effect?
> > > 2. app.config appears in one project of my solution, I cannot se it
> > > in the release version.
> > > The data isn't in MyMain.exe.config
> > > Where is the data stored?
You realize that only a single config file is deployed for an entire application or website, right? And that's the app.config of your target project, or web.config of the website you're building. Are you trying to use multiple .config files for a single solution?
On Wed, May 14, 2008 at 3:32 AM, cppquester <cppques...@googlemail.com> wrote:
> On May 13, 7:16 pm, "Andrew Badera" <and...@badera.us> wrote: > > I'm having a hard time understanding the issue ... why do you have to > fuddle > > around with the .config C? Educate me please!
> > OP: > > .config files are read on startup/application pool recycle (I think)/web > app > > recompile
> I want to be able to change the DB connect string (DSN, name, > password). I think this information is in the > config file (of one project of my solution, actually I don't see the > information in the exe.config file of the program) > But there isn't any effect when I change it in the config file and > rebuild afterwards. > The program still uses the same DB.
> Regards, > Marc
> > .config file sections can be manually refreshed using .RefreshSection()
> > On Tue, May 13, 2008 at 1:10 PM, Cerebrus <zorg...@sify.com> wrote:
> > > Your config will be built into the the Bin directory of the current > > > project only. I'm currently dealing with the same problem and am > > > having to manually copy the "MyProject.dll.config" file to the Startup > > > project's Bin directory.
> > > I wonder if someone else can shed light on a way to automatically > > > build the config file to the main project build directory.
> > > On May 13, 8:07 pm, cppquester <cppques...@googlemail.com> wrote: > > > > If I change my app.config file, nothing happens: The DB is accessed > > > > like before. > > > > No error, everything seems to work normal. > > > > I rebuild my solution, even after restarting VS2005.
> > > > My questions: > > > > 1. When is the input of app.config taken? Why am I not seeing any > > > > effect?
> > > > 2. app.config appears in one project of my solution, I cannot se it > > > > in the release version. > > > > The data isn't in MyMain.exe.config > > > > Where is the data stored?