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

appSettings when testing code

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?

Jul 19 '05 #1
4 4050
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 ..



Jul 19 '05 #2
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

"John Seaden" <jo*********@kent.fire-uk.org> wrote in message
news:03****************************@phx.gbl...
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?

Jul 19 '05 #3

Oh!

So many thanks, Jay

I thought I was going crazy.

John Seaden
IS Strategic Development Officer
Kent Fire Brigade

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 19 '05 #4
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.

Jul 19 '05 #5

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

Similar topics

4
by: John Seaden | last post by:
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....
4
by: JMD | last post by:
I am curious to know if there are performance issues in choosing between A and B. Which performs best? A. store string values in the web.config and pull them using...
4
by: Robert Pfeffer | last post by:
Hi, I have a rather unusual problem. I have a very simple ASP.NET application, basically hello world type. I created it with Visual Studio 2003 and am running it in debug mode. It runs fine...
3
by: Rudy | last post by:
Hello All! I'm just trying to set my SQL connection String in the app setting of my Web Config. I got it to work on one page, but my code is a little diffrent for another page that has a little...
2
by: Jared Hagel | last post by:
I've searched the web for a solution to this problem. Surprisingly, no problem/solution has been posted yet. We can read application configuration information fine when our asp.net application...
3
by: stockbuildingsupply | last post by:
i have an app.config file in my vb vs2k5 win form project. when i try to set a different value for "DbConnectionString" and run the application i get the following error. any help is appreciated....
4
by: Jim in Arizona | last post by:
I've been using VB 2005 for a few years now. My entire coding history is VB related. This weekend I decided to start learning C#. I'm at work now and decided to do some coding in C# that I would...
7
by: moondaddy | last post by:
I'm running a wpf windows app and want to add the appSettings element to the config file. when I do, the app wont start up and I get the following error: {"The type initializer for...
6
by: Nick | last post by:
Hi there, I have a Windows Service application that has a load of settings defined, I can access these using My.Settings. I would like to pass the NameValueCollection of the settings to...
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
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.