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

config file literally "consumed"

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
2 2183
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Geoffrey | last post by:
Hope someone can help. I am trying to read data from a file binary file and then unpack the data into python variables. Some of the data is store like this; xbuffer:...
19
by: les_ander | last post by:
Hi, suppose I am reading lines from a file or stdin. I want to just "peek" in to the next line, and if it starts with a special character I want to break out of a for loop, other wise I want to...
4
by: Kevin Goodsell | last post by:
The return value of sscanf should be "the number of input items assigned" (unless an input failure occurs before any conversion). Are items assigned due to a "%n" directive included in the returned...
12
by: Assaf | last post by:
Hi all, My client is using an online service provider that processes survey responses. After a user fills survey.aspx and presses the OK button, 2 things need to happen: 1. the data has to...
2
by: Kunk | last post by:
Hi All, I was curious if an exception is generated with the .ReadLine() function (found in the StreamReader class), will the current line be consumed? Thus the next .ReadLine() will start at the...
6
by: Paul Klanderud | last post by:
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,...
2
by: zahaby | last post by:
Is it applicable to use the Microsoft Enterprise Library in Logging without using the configuration tool ? I would like to configure and choose the trace listener programmatically . Thanks in...
30
by: kj | last post by:
My book (Flanagan's JavaScript: The Definitive Guide, 5th ed.) implies on page 111 that the following two constructs are equivalent: ( x.constructor == Foo ) and ( x instanceof Foo ) The...
8
by: clyfish | last post by:
In cmd, I can use find like this. C:\>netstat -an | find "445" TCP 0.0.0.0:445 0.0.0.0:0 LISTENING UDP 0.0.0.0:445 *:* C:\> And os.system is OK....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...
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
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,...
0
isladogs
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...

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.