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

app.exe.confg file being deleted when windows application is compi

I just upgraded from the 2002.net to the 2003.net. I had been using a
..config file for database conection info. Now when I compile my application
to debug the config file is being deleted out of the /bin/debug folder. Is
there a fix for this?
Nov 22 '05 #1
2 1648
It does this by design (unfortunately). Here's what you do:

In the root of your project you should have (and if you don't, just add) a
file called app.config. Use this file as your master copy. Then when you
compile your program, let's say the exe is called "myProgram.exe", VS will
copy the app.config file to the bin/debug folder and automatically rename
it, "myProgram.exe.config"

Each time you compile it will keep doing this; deleting the existing
myProgram.exe.config file and replacing it with the app.config file from the
root of the project.

Hope this helps,

Kevin

"Todd" <To**@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
I just upgraded from the 2002.net to the 2003.net. I had been using a
.config file for database conection info. Now when I compile my
application
to debug the config file is being deleted out of the /bin/debug folder.
Is
there a fix for this?

Nov 22 '05 #2
It does this by design (unfortunately). Here's what you do:

In the root of your project you should have (and if you don't, just add) a
file called app.config. Use this file as your master copy. Then when you
compile your program, let's say the exe is called "myProgram.exe", VS will
copy the app.config file to the bin/debug folder and automatically rename
it, "myProgram.exe.config"

Each time you compile it will keep doing this; deleting the existing
myProgram.exe.config file and replacing it with the app.config file from the
root of the project.

Hope this helps,

Kevin

"Todd" <To**@discussions.microsoft.com> wrote in message
news:DE**********************************@microsof t.com...
I just upgraded from the 2002.net to the 2003.net. I had been using a
.config file for database conection info. Now when I compile my
application
to debug the config file is being deleted out of the /bin/debug folder.
Is
there a fix for this?

Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Todd | last post by:
I just upgraded from the 2002.net to the 2003.net. I had been using a ..config file for database conection info. Now when I compile my application to debug the config file is being deleted out of...
1
by: Tony | last post by:
Hello everyone, I need to build a help file for a windows application, what i want to do is i got 3 forms, on each form when the user click on the "?" button on the top right corner, a help file...
1
by: TT (Tom Tempelaere) | last post by:
Hi people We have a strange (unexpected) problem with our application configuration file. When we place the config file in the same directory as the assembly it is deleted when we build our...
2
by: Daniel López | last post by:
Anyone know how can I upload a file to a PHP Web Form from a C# Windows Application ? I've tried to use WebClient.UploadFile("path_file_to_upload","url_of_php_form"); but with this I don't...
1
by: lukegregory | last post by:
On the MenuItem1_Click action what code do I need to open either a URL or ..htm file?
4
by: archana | last post by:
Hi all, Can any one tell me how to upload file in windows application developed in C#.net. Or can i use method webclient.uploadfile in windows application. Please help me asap. thanks in...
6
by: yaron.guez | last post by:
Whenever I create a new windows application from Visual Studio .NET 2003 in either C# or VB.NET upon running the compiled code (debugging or not) I receive a System.NullReferenceException...
3
by: Raj | last post by:
Hi All.., I have a VB.Net Windows Application.. I need to Run this Exe From Some Other System(Client) and I need to Upload some specified files to the Server System.. Now my doubts are.. ...
0
by: DeepthiSem | last post by:
Hi Everyone I have an issue in running the DB2 command script using Batch file from Windows application. From my application i am calling the batch file which inturn runs the Db2cmd prompt . ...
1
by: =?Utf-8?B?UmFqdSBB?= | last post by:
hi, Can any one help me .. how to save outlook attachment file in C# windows Application... i m able to read the filename but i dont know how to save the attachment file to my local Drives......
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:
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.