Class Library Project Settings Just Disappear

I'm developing with VS 2008 in .NET 3.5 with Visual Basic.

My solution contains 3 Class Library projects and a Win Forms Application project.  Recently, one of the Class Libraries started mysteriously loosing its settings.  When I attempt to restore a value, the IDE erases it.  How can I fix this?

I would also like to know how bypass the project settings and use the Application settings instead?
ITSAdminAsked:
Who is Participating?
 
CodeCruiserConnect With a Mentor Commented:
I have no idea why but I always store my connection strings as Strings in settings anyway.
0
 
Gary DavisDir Internet SvcsCommented:
Perhaps you are editing the file that is auto-generated instead of the config file. The regeneration would wipe out any changes you make.
0
 
ITSAdminAuthor Commented:
I with it were that simple.  No, I'm editing the setting on the Class Project My Project sheet.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
CodeCruiserCommented:
Are you talking about the settings on Settings page in project properties?
0
 
ITSAdminAuthor Commented:
Yes, I am.  What would make the brand new setting (tested via elipsis ... button >> test connection button) to be rejected as soon as it is entered?  Here's an example:

Data Source=sqlserver;Initial Catalog=finance;Integrated Security=True

 Test Connection was successful
0
 
CodeCruiserCommented:
Show us a screenshot of the Settings tab as well. Does it happen to a newly created setting as well? Check to make sure the app.config file is not marked as readonly.
0
 
ITSAdminAuthor Commented:
The top image is after adding the connection string.  I left the tab and returned.  The lower image is what results. Checked the App.Config too with Explorer and it is not read only.



Before and After
0
 
CodeCruiserCommented:
Sorry for late reply. Try adding a string type setting and see if it works.
0
 
ITSAdminAuthor Commented:
That seems to work!  I've changed all the Connection Strings to String and it works fine.  Why?  And why do my other projects not have a problem with Connection Strings working?  Is there a setting somewhere that can reverse this behavior?
0
 
ITSAdminAuthor Commented:
Good advice on how to handle this situation.
0
All Courses

From novice to tech pro — start learning today.