In a C# desktop application, I am using linq to sql to connect to a sql server 2008 r2 database. The application is setup to point to various databases depending upon the value in the app.config file.
The problem is code in the *.designer.cs gets overrriden somehow by defaults in the .net problem framework. When this happens the using system.configuration gets removed from the application and the default settings values are used to get the database connection string values.
When I notice this problem occurs, I need to do the following:
place the
using system.configurationcode back into*.designer.csfilechange the code so the database connection info is obtained from the
app.config fileremove the property settings so the
defaultdatabase connections are not used.
Thus can you tell me what is causing this problem to occur and how to solve the problem?