Solved

Class Library Project Settings Just Disappear

Posted on 2011-03-11
10
498 Views
Last Modified: 2013-11-27
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?
0
Comment
Question by:ITSAdmin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 18

Expert Comment

by:Gary Davis
ID: 35115951
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
 

Author Comment

by:ITSAdmin
ID: 35130501
I with it were that simple.  No, I'm editing the setting on the Class Project My Project sheet.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35131850
Are you talking about the settings on Settings page in project properties?
0
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!

 

Author Comment

by:ITSAdmin
ID: 35132057
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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35132103
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
 

Author Comment

by:ITSAdmin
ID: 35132432
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
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35187729
Sorry for late reply. Try adding a string type setting and see if it works.
0
 

Author Comment

by:ITSAdmin
ID: 35408208
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
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 35408554
I have no idea why but I always store my connection strings as Strings in settings anyway.
0
 

Author Closing Comment

by:ITSAdmin
ID: 35408596
Good advice on how to handle this situation.
0

Featured Post

Is Your DevOps Pipeline Leaking?

Is your CI/CD pipeline a hodge-podge of randomly connected tools? You’ve likely got a tool to fix one problem & then a different tool to fix another, resulting in a cluster of tools with overlapping functionality. Learn how to optimize your pipeline with Gartner's recommendations

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Calendar Control 5 54
Open telerik datetime picker programmatically 13 42
search by any word in column 5 29
ASP.NET VB code for check and insert in a table 4 45
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

751 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