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

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

P: n/a
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
Nov 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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" <mr***@gotoarc.com>
| From: "MDReed@ARC" <md****@dana-reed.com>
| 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: <OT**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 216.160.0.129
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.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
|
|
|

Nov 20 '05 #2

P: n/a
On Tue, 28 Oct 2003 14:22:10 -0600, MDReed@ARC wrote:
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.

--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #3

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

"Johan Stenberg [MSFT]" <jo******@online.microsoft.com> wrote in message
news:iF**************@cpmsftngxa06.phx.gbl...
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" <mr***@gotoarc.com>
| From: "MDReed@ARC" <md****@dana-reed.com>
| 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: <OT**************@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.vb
| NNTP-Posting-Host: 216.160.0.129
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTN GP08.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
|
|
|

Nov 20 '05 #4

P: n/a
* "MDReed@ARC" <md****@dana-reed.com> scripsit:
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>
Nov 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.