473,322 Members | 1,781 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,322 software developers and data experts.

VS.Net 2003: Where is the .config file?

Hi,

We just converted our VB.Net Windows exe project from
VS.Net 2002 to VS.Net 2003 and ran into a problem. the
MyApp.exe.config file that we use for our customized
configuration settings is removed when the conversion is
done. It won't work even if I menully copy the file back.
The settings are not get recogenized. What's going on?

Thanks
Nov 20 '05 #1
5 3362
* "feng" <an*******@discussions.microsoft.com> scripsit:
We just converted our VB.Net Windows exe project from
VS.Net 2002 to VS.Net 2003 and ran into a problem. the
MyApp.exe.config file that we use for our customized
configuration settings is removed when the conversion is
done. It won't work even if I menully copy the file back.
The settings are not get recogenized. What's going on?


Change the file name to "App.config" and put it into the project's
source code directory. Then add the file to the project. VS.NET 2003
will copy the file to the "bin" directory automatically when building
the solution and rename it appropriately.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #2
Thanks for your reply!

I tried exactly what you said but I still couldn't get the
VS.Net 2003 to copy and rename my App.config file into my
bin directory. When adding the config file to the project,
I tried all 4 types of "Build Action" but none of those
worked. After rebuilding the solution, the config file
never get generited in the project's bin directory. The
only way to make the code work is to menully copy the file
into bin AFTER rebuilding (copy file before rebuilding
won't work because rebuilding will remove it from bin) and
properly rename it.

What am I doing wrong here?

Thanks again.

feng
-----Original Message-----
* "feng" <an*******@discussions.microsoft.com> scripsit:
We just converted our VB.Net Windows exe project from
VS.Net 2002 to VS.Net 2003 and ran into a problem. the
MyApp.exe.config file that we use for our customized
configuration settings is removed when the conversion is done. It won't work even if I menully copy the file back. The settings are not get recogenized. What's going on?
Change the file name to "App.config" and put it into the

project'ssource code directory. Then add the file to the project. VS.NET 2003will copy the file to the "bin" directory automatically when buildingthe solution and rename it appropriately.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

Nov 20 '05 #3
feng,
The app.config file needs to be in the root of your VS.NET project (not in
any subfolders!), it needs to be called literally "app.config" without the
quotes. The build action can be left to None.

The project needs to be an Executable project an EXE.

The easiest way to create a properly named app.config in your project is to
use "Project - Add New Item - Application Configuration File".

Hope this helps
Jay

"feng" <an*******@discussions.microsoft.com> wrote in message
news:1c*****************************@phx.gbl...
Thanks for your reply!

I tried exactly what you said but I still couldn't get the
VS.Net 2003 to copy and rename my App.config file into my
bin directory. When adding the config file to the project,
I tried all 4 types of "Build Action" but none of those
worked. After rebuilding the solution, the config file
never get generited in the project's bin directory. The
only way to make the code work is to menully copy the file
into bin AFTER rebuilding (copy file before rebuilding
won't work because rebuilding will remove it from bin) and
properly rename it.

What am I doing wrong here?

Thanks again.

feng
-----Original Message-----
* "feng" <an*******@discussions.microsoft.com> scripsit:
We just converted our VB.Net Windows exe project from
VS.Net 2002 to VS.Net 2003 and ran into a problem. the
MyApp.exe.config file that we use for our customized
configuration settings is removed when the conversion is done. It won't work even if I menully copy the file back. The settings are not get recogenized. What's going on?


Change the file name to "App.config" and put it into the

project's
source code directory. Then add the file to the

project. VS.NET 2003
will copy the file to the "bin" directory automatically

when building
the solution and rename it appropriately.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
.

Nov 20 '05 #4
Thank you so much Jay! It works this time!

It's a little wired though that the file has to be
named "app.config" and has to be located in the root. I
don't know how many people appreciate this "new feature"
of VS.Net 2003. :)

Thank you again for your great help!
-----Original Message-----
feng,
The app.config file needs to be in the root of your VS.NET project (not inany subfolders!), it needs to be called literally "app.config" without thequotes. The build action can be left to None.

The project needs to be an Executable project an EXE.

The easiest way to create a properly named app.config in your project is touse "Project - Add New Item - Application Configuration File".
Hope this helps
Jay

"feng" <an*******@discussions.microsoft.com> wrote in messagenews:1c*****************************@phx.gbl...
Thanks for your reply!

I tried exactly what you said but I still couldn't get the VS.Net 2003 to copy and rename my App.config file into my bin directory. When adding the config file to the project, I tried all 4 types of "Build Action" but none of those
worked. After rebuilding the solution, the config file
never get generited in the project's bin directory. The
only way to make the code work is to menully copy the file into bin AFTER rebuilding (copy file before rebuilding
won't work because rebuilding will remove it from bin) and properly rename it.

What am I doing wrong here?

Thanks again.

feng
>-----Original Message-----
>* "feng" <an*******@discussions.microsoft.com> scripsit: >> We just converted our VB.Net Windows exe project from
>> VS.Net 2002 to VS.Net 2003 and ran into a problem. the >> MyApp.exe.config file that we use for our customized
>> configuration settings is removed when the conversion

is
>> done. It won't work even if I menully copy the file

back.
>> The settings are not get recogenized. What's going on? >
>Change the file name to "App.config" and put it into
the project's
>source code directory. Then add the file to the

project. VS.NET 2003
>will copy the file to the "bin" directory automatically

when building
>the solution and rename it appropriately.
>
>--
>Herfried K. Wagner [MVP]
><URL:http://dotnet.mvps.org/>
>.
>

.

Nov 20 '05 #5
feng,
It's a little wired though that the file has to be
named "app.config" and has to be located in the root. Its not really that weird, as VS.NET needs to find it.

Remember that VS.NET 2003 has the ability to set which version of the
runtime should be used, to do this it needs to modify the app.config file,
to find the app.config file it needs to be well known in a known place in
your project, the most logical place is the root. Otherwise VS.NET would
need to recurse the entire project structure looking for the file, if you
have an obnoxiously large project this may take time. Hence its in the root.

VS.NET 2002 will also copy the app.config from the root folder into the
output folder, however it cannot modify the runtime version.

Hope this helps
Jay

"feng" <an*******@discussions.microsoft.com> wrote in message
news:1c*****************************@phx.gbl... Thank you so much Jay! It works this time!

It's a little wired though that the file has to be
named "app.config" and has to be located in the root. I
don't know how many people appreciate this "new feature"
of VS.Net 2003. :)

Thank you again for your great help!
-----Original Message-----
feng,
The app.config file needs to be in the root of your

VS.NET project (not in
any subfolders!), it needs to be called

literally "app.config" without the
quotes. The build action can be left to None.

The project needs to be an Executable project an EXE.

The easiest way to create a properly named app.config in

your project is to
use "Project - Add New Item - Application Configuration

File".

Hope this helps
Jay

"feng" <an*******@discussions.microsoft.com> wrote in

message
news:1c*****************************@phx.gbl...
Thanks for your reply!

I tried exactly what you said but I still couldn't get the VS.Net 2003 to copy and rename my App.config file into my bin directory. When adding the config file to the project, I tried all 4 types of "Build Action" but none of those
worked. After rebuilding the solution, the config file
never get generited in the project's bin directory. The
only way to make the code work is to menully copy the file into bin AFTER rebuilding (copy file before rebuilding
won't work because rebuilding will remove it from bin) and properly rename it.

What am I doing wrong here?

Thanks again.

feng
>-----Original Message-----
>* "feng" <an*******@discussions.microsoft.com> scripsit: >> We just converted our VB.Net Windows exe project from
>> VS.Net 2002 to VS.Net 2003 and ran into a problem. the >> MyApp.exe.config file that we use for our customized
>> configuration settings is removed when the conversion
is
>> done. It won't work even if I menully copy the file
back.
>> The settings are not get recogenized. What's going on? >
>Change the file name to "App.config" and put it into the project's
>source code directory. Then add the file to the
project. VS.NET 2003
>will copy the file to the "bin" directory automatically
when building
>the solution and rename it appropriately.
>
>--
>Herfried K. Wagner [MVP]
><URL:http://dotnet.mvps.org/>
>.
>

.

Nov 20 '05 #6

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

Similar topics

1
by: David Lee | last post by:
Need some help bad here. Am using VB.Net Standard 2003 supplied for a class and I need to install Msde and the sample databases to work on homework. Following the documentation I can download...
1
by: rbt | last post by:
The below script produces a ' Bad File Descriptor' when executed. If I remove the try: except: statements, the script stops when the error occurs. The purpose of the script is to monitor the...
3
by: Les Caudle | last post by:
When I compile my project in VS.NET 2003, the projectName.exe.config file in the BIN directory is deleted. This was not the case in VS.NET 2002. How can I resolve this? -- Thanks in advance,...
2
by: Dave Girvitz | last post by:
Yesterday I was giving a presentation on the Trace Class to my user's group. For the purposes of the presentation, I wrote a quick app that used a configuration file to set the TraceLevel of my...
2
by: noleander | last post by:
I'm trying to get Vis C++ std to compile using /O2 optimizing flag. Many people have suggested downloading the MS C++ 2003 Toolkit ... it supposedly has C++ compiler bins that one could use. I...
3
by: Robin | last post by:
I am trying to get a virtual directory ASP.Net application to work on a Windows 2003 server that has Sharepoint 2003. I have followed the Microsoft knowledgebase but the error message below still...
2
by: Varsha | last post by:
Hi, a) I have a windows 2003 server on my machine with in built .NET Framework 1.1. b) I have also installed .NET Framework 1.0 on this machine. c) I have a web service, when i try to...
9
by: Symon | last post by:
I've got a web service project that was built under VS 2003 which has a SoapExtension in the project. The SoapExtension is registered in the <soapExtensionTypes> element of the web.config and has...
2
by: remya1000 | last post by:
i'm using VB.NET 2003. Last time while i did a program in Vb.Net 2005, i use "Configuration". and i could read and write to that XML configuration file like the example below. CODES:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.