Did the OP ever solve this problem?
I recently had this exact same issue in Visual Studio 2015 (VS2015) and Visual Studio 2017 (VS2017). In previous projects, when adding a DataSet and configuring the TableAdapter, the wizard would show ConnectionStrings that were configured in the Project Settings (which are stored in the app.config
. The wizard page would show the name of the string from settings, and the word (Settings)
after it to indicate where it came from, as seen here:
However, in a recent project, it would not show the ConnectionStrings from the Project Settings.
It turns out, that in my case, I had copied a previous similar project to use as a shell to start the new project. This included the app.config
. I had manually edited a bunch of the files to reflect what was needed for the new project, including the connection string, and I had inadvertently REMOVED a vital value, which was the providerName
.
In the app.config
, in the ConnectionStrings
section, each string needs to specify the name
, the ConnectionString
AND the providerName
. I had accidentally removed the providerName
value. Here is an example of the correct settings in app.config
<connectionStrings>
<add name="MembershipCRM.Properties.Settings.app_ogca_CRMConnectionString"
connectionString="Data Source=MYSERVERNAME\SQL2014;Initial Catalog=app_ogca_CRM;Integrated Security=True"
providerName="System.Data.SqlClient" />
<add name="MembershipCRM.Properties.Settings.app_ogca_QBIConnectionString"
connectionString="Data Source=MYSERVERNAME\SQL2014;Initial Catalog=app_ogca_QB;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
Without the providerName
value, indicating which kind of data source the ConnectionString refers to, the TableAdapter Configuration Wizard doesn't think it is valid, and will ignore it. As soon as I added the providerName="System.Data.SqlClient"
value back, the wizard immediately picked it up.