appSettings when testing code

J

John Seaden

Hi,
I've been trying to use appSettings for a VB.Net exe file
with mixed success.
At first I thought the program was just not working and
that I had made some sort of mistake in the config file.
It now appears that it works fine if I run the actual exe
file from within the obj/debug folder - provided that I
copy the config file into there - but I cannot get it to
work from within the Visual Stdio IDE so I cannot step
through the code to debug.

Anyone know whether this is correct?
 
S

soni

Hi,
i have used hte configuration file and the appsettings tag. it works pretty
fine .
my question is this .. y r u trying to run the exe from the obj.debug
folder..? the .exe.config file will be created in the bin directory.
so if u run the exe in the bin directory it should work fine ..
 
J

Jay B. Harlow [MVP - Outlook]

John,
Is this VS.NET 2003?

Microsoft fixed a 'feature' of VS.NET 2002 in VS.NET 2003. :-|

You need to add your config file to your VS.NET project's root folder as
app.config, it needs to be named "app.config" without the quotes. When you
build your project VS.NET (both versions) will copy the app.config file from
the project root to your output folder and name it appropriately
(myproject.exe.config).

Hope this helps
Jay
 
J

John Seaden

Oh!

So many thanks, Jay

I thought I was going crazy.

John Seaden
IS Strategic Development Officer
Kent Fire Brigade
 
T

Tian Min Huang

Hi John,

Please refer to KB article 313405 on how to add Application Configuration
File and use it.

HOW TO: Store and Retrieve Custom Information from an Application
Configuration File by Using Visual Basic .NET
http://support.microsoft.com/?id=313405

Hope this helps

Regards,
HuangTM
This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top