?
Solved

My.Settings problem

Posted on 2007-08-09
9
Medium Priority
?
151 Views
Last Modified: 2010-04-23
I ave posted an earlier question with regard to an error message however, I think this provides (well hopefuly) more of an idea what is wrong

If I try to use   My.Settings.User_Email it fails, there is not object

However, if I try  uteEmail.Text = My.Settings.Default.User_Email it works albeit it has no data as nothing it assigned in applicaiotn.

The connection string works as this is set so
My.Settings.Default.ConnectionString is ok but My.Settings.ConnectionString is not

Any ideas?

0
Comment
Question by:rocky050371
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 19665280
In my projects configuration file on the settings tab I entered under Name User_Email and under Type I have String and Scope is set to User. I compiled the project and then added the following and it worked with no problem.

        Dim em As String = My.Settings.User_Email
        Console.WriteLine(em)

Can you post what you have for the Settings tab of the projects configuration file?
0
 

Author Comment

by:rocky050371
ID: 19665293
I have the same I believe it is a deeper issue as it used to work fine
0
 
LVL 64

Expert Comment

by:Fernando Soto
ID: 19665338
If you are working on Visual Basic 2005 have you tried to clean out the project files by going to the main menu Build -> Clean "Project name" and then recompiling the project?
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

Author Comment

by:rocky050371
ID: 19665488
I deleted all the files from the bin folder. But it is still the same. I even tried deleting the settings file then recreating
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 19666154
Do you have an app.config file in the project, along with the Settings files?

Bob
0
 

Author Comment

by:rocky050371
ID: 19666204
I have an app.comfig file, and there is a settings.vb file
0
 
LVL 14

Expert Comment

by:ptakja
ID: 19667420
Have you tried deleting the \OBJ directory? The IDE will recreate that directory the next time you build the project.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 19668645
Did you manually edit the app.config file?  Is there a problem reading the app.config file?

Bob
0
 

Author Comment

by:rocky050371
ID: 19668685
I recreated the solution, it took a while. I did amend the config file, I think that may have been the issue
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Loops Section Overview
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month14 days, 22 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question