config file literally "consumed"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Klanderud

    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.ex e.config," has some
    <system.diagnos tics> 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 "AutoGenera te") and rebooted, but this didn't make any
    difference.

    Anyone have any ideas?
    TIA,
    Paul Klanderud


    Am I missing something very basic?


  • Jay B. Harlow [MVP - Outlook]

    #2
    Re: config file literally &quot;consumed& quot;

    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" <com_is_good@no spamhotmail.com > wrote in message
    news:0c6b01c351 d4$ea414ad0$a30 1280a@phx.gbl.. .[color=blue]
    > 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.ex e.config," has some
    > <system.diagnos tics> 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 "AutoGenera te") and rebooted, but this didn't make any
    > difference.
    >
    > Anyone have any ideas?
    > TIA,
    > Paul Klanderud
    >
    >
    > Am I missing something very basic?
    >
    >[/color]


    Comment

    • Paul Klanderud

      #3
      Re: config file literally &quot;consumed& quot;

      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
      [color=blue]
      >-----Original Message-----
      >Paul,
      >Microsoft fixed a 'feature' of VS.NET 2002 in VS.NET[/color]
      2003. :-|[color=blue]
      >
      >You need to add your config file to your VS.NET project's[/color]
      root folder as[color=blue]
      >app.config, it needs to be named "app.config " without the[/color]
      quotes. When you[color=blue]
      >build your project VS.NET (both 2002 & 2003) will copy[/color]
      the app.config file[color=blue]
      >from the project root to your output folder and name it[/color]
      appropriately[color=blue]
      >(myproject.exe .config).
      >
      >Hope this helps
      >Jay
      >
      >"Paul Klanderud" <com_is_good@no spamhotmail.com > wrote in[/color]
      message[color=blue]
      >news:0c6b01c35 1d4$ea414ad0$a3 01280a@phx.gbl. ..[color=green]
      >> 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.ex e.config," has some
      >> <system.diagnos tics> settings (trace listeners).
      >>
      >> When my file is read only, things are fine. However,[/color][/color]
      when[color=blue][color=green]
      >> 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[/color][/color]
      very[color=blue][color=green]
      >> 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[/color][/color]
      (from "machine"[color=blue][color=green]
      >> and "AutoGenera te") and rebooted, but this didn't make[/color][/color]
      any[color=blue][color=green]
      >> difference.
      >>
      >> Anyone have any ideas?
      >> TIA,
      >> Paul Klanderud
      >>
      >>
      >> Am I missing something very basic?
      >>
      >>[/color]
      >
      >
      >.
      >[/color]

      Comment

      Working...