why does the design environment deletes .config from the bin folder?

  • Thread starter Thread starter MDReed@ARC
  • Start date Start date
M

MDReed@ARC

I am using the .config as a configuration file for my Win Forms app.
"AppName.exe.config" Can any one tell me why the design environment deletes
it from the bin folder? I have to copy it in and market it read only the
program will run once then the next time I run the program it deletes the
file event though it is marked read only. I if I do not market it read only
the development environment deletes the file, which means I it is not there
when the form loads, when it is needed. When the program is deployed it
leaves the config file there.
mreed
 
If you name the file app.config and add it to the project (not to the bin
directory) When you run your app in the debugger, it will be copied to the
correct directory with the correct file name.

Regards,
Johan

--
Johan Stenberg (MSFT), VB .NET Team
This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
| Reply-To: "MDReed@ARC" <[email protected]>
| From: "MDReed@ARC" <[email protected]>
| Subject: why does the design environment deletes .config from the bin
folder?
| Date: Tue, 28 Oct 2003 14:22:10 -0600
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OT0#[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 216.160.0.129
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.
phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:151430
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
| I am using the .config as a configuration file for my Win Forms app.
| "AppName.exe.config" Can any one tell me why the design environment
deletes
| it from the bin folder? I have to copy it in and market it read only the
| program will run once then the next time I run the program it deletes the
| file event though it is marked read only. I if I do not market it read
only
| the development environment deletes the file, which means I it is not
there
| when the form loads, when it is needed. When the program is deployed it
| leaves the config file there.
| mreed
|
|
|
 
I am using the .config as a configuration file for my Win Forms app.
"AppName.exe.config" Can any one tell me why the design environment deletes

Add it to your project and name it App.Config. The IDE will then rename it
properly for you and it wont be deleted.
 
Your right I was getting a head of my self or the environment and tiring to
rename to the program name. This one case to leave stuff alone.

Thank you,

Mike Reed
 
* "MDReed@ARC said:
I am using the .config as a configuration file for my Win Forms app.
"AppName.exe.config" Can any one tell me why the design environment deletes
it from the bin folder? I have to copy it in and market it read only the

The behavior has changed in VS.NET 2003. Add the "app.config" file to
your project. VS.NET will copy it to the "bin" directory automatically.

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

Improve your quoting style:
<http://learn.to/quote>
<http://www.plig.net/nnq/nquote.html>
 
Back
Top