config file literally "consumed"

  • Thread starter Thread starter Paul Klanderud
  • Start date Start date
P

Paul Klanderud

I'm encountering a strange situation with a .config file
for a simple windows form test harness I built to test
some components normally invoked by a windows service.

My config file, "testharness.exe.config," has some
<system.diagnostics> settings (trace listeners).

When my file is read only, things are fine. However, when
I toggle the read-only attribute off (so I can edit it),
and then run my test harness, as soon as I get to the very
first line of execution ...

static void Main()
{
Application.Run(new Form1());
}

.... my .config file is deleted from the folder!!!

I'm really confused by this behavior, which I've never
observed before.

What's changed on my box is I removed v 1.0.3705 (under
which my service previously had been compiled) and
installed v 1.1.4322, as well as the VS 2003 IDE.

On a hunch I changed a couple attributes in the
<processModel> node of my machine.config file ... set
username and password to a domain account (from "machine"
and "AutoGenerate") and rebooted, but this didn't make any
difference.

Anyone have any ideas?
TIA,
Paul Klanderud


Am I missing something very basic?
 
Paul,
Microsoft fixed a 'feature' of VS.NET 2002 in VS.NET 2003. :-|

You need to add your config file to your VS.NET project's root folder as
app.config, it needs to be named "app.config" without the quotes. When you
build your project VS.NET (both 2002 & 2003) will copy the app.config file
from the project root to your output folder and name it appropriately
(myproject.exe.config).

Hope this helps
Jay
 
Jay,

Thanks a ton!! I couldn't find anything on this "fix"
anywhere, and was just wondering if I'd royally screwed up
my machine with the install.

Thanks again!

Paul
 
Back
Top