By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,825 Members | 1,258 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,825 IT Pros & Developers. It's quick & easy.

config file literally "consumed"

P: n/a
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?
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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

"Paul Klanderud" <co*********@nospamhotmail.com> wrote in message
news:0c****************************@phx.gbl...
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?

Jul 19 '05 #2

P: n/a
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
-----Original Message-----
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 asapp.config, it needs to be named "app.config" without the quotes. When youbuild your project VS.NET (both 2002 & 2003) will copy the app.config filefrom the project root to your output folder and name it appropriately(myproject.exe.config).

Hope this helps
Jay

"Paul Klanderud" <co*********@nospamhotmail.com> wrote in messagenews:0c****************************@phx.gbl...
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?

.

Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.