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

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

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
4 1403
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
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
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
* "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Einar Høst | last post by:
Hi, I must be doing something wrong: Visual Studio .NET 2003 insists on deleting my app.exe.config file from the debug folder whenever I compile my project ?! Why? - Einar
10
by: Fei Li | last post by:
Hi, If I'm not stupid for this, then the design of FolderBrowserDialog is very stupid. It only allow to strat browing from several predefined folder(Environment.SpecialFolder). What can I do if...
2
by: te goody | last post by:
Problem summary: Web Site Admin Tool is not generating the application services database (aspnetdb.mdf); i.e. The DB is not found under the app_data directory. The Question: What configuration...
45
by: salad | last post by:
I'm curious about your opinion on setting relationships. When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. Over time I'd go into the window and see...
12
by: rdemyan via AccessMonster.com | last post by:
I'm having a complicated linking problem. Before I get into the particulars, I'd like to know how Access links to the back-end file at startup, AFTER I've distributed my application to the client....
7
by: Artie | last post by:
Hi, Our team have a web project which includes some C# ActiveX DLLs. On some developers' PCs, the code which calls methods in the ActiveX dll is succesful - no exceptions. On other PCs, the...
1
by: =?Utf-8?B?Uk1C?= | last post by:
I am using the Configuration Application Block, and I want to keep my config files in a folder off of the app root called config. I have modified the app.config to point to the folder with a...
6
by: Andy Fish | last post by:
Hi, From what I can gather, under Asp.Net 2.0, it is safe to put data and config files underneath the app_data in the web root and they will not be served directly to the browser from a URL. ...
1
by: jabbari | last post by:
Hello, Please Help us...! I have a big problem ,so i searched on google and other search engine ,then I realized that so many other people have the same problem and they, all, have'nt been able to...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.