"The connection property in the Application Settings file is missing or incorrect. The connection string from the .dbml file has been used in its place".
I am also getting the warning message: warning CS0618: 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete,
it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings".
What I am trying to do is obtain the connection string information from the app.configuration file instead from the app settings file.
To accomplish this goal I am changing the *designer.cs to use the following code to obtain the connection string information:
base(ConfigurationManager.ConnectionStrings["DEVConnectionString"].ConnectionString, mappingSource)
The app.configuration file looks like the following:
The above code works fine when I setup the code initially.
However once I reopen the solution file, I get the message listed above,
""The connection property in the Application Settings file is missing or incorrect.
The connection string from the .dbml file has been used in its place".
To solve this problem, I was trying to do the following steps:
1.Step 1: Right click on the .DBML file and select "Run Custom Tool".
2.Step 2: Set "Application setting = false" in the connecton properties of your DataContext.
3.Step 3: press "Save All".
The problem with the above solution is once I selected "Run Custom Tool", nothing happened. There was nothing for me to select.
Thus can you tell me and/or show me in code how to solve this problem?
Amit ChoudharyPosted Jan 30, 2013, 8:30 AM
Now the designer will no longer generate the default constructor when you reopen it.