Visual Studio 2017 the connection string could not be found in application settings

前端 未结 3 2026
北海茫月
北海茫月 2021-01-13 14:21

For connection database and reading data, I am using a dataset which read connection string from Web.config file. Everything working in Visual Studio 2013. But when I opened

3条回答
  •  伪装坚强ぢ
    2021-01-13 15:05

    Try to update your Visual Studio to 15.9 in the first place. And if it didn't fix the problem, try the following steps:

    • Close the DataSet window with the error.
    • Right click the DataSet in the solution explorer.
    • Select "Open with…" from the context menu.
    • Select "Source Code (Text) Editor" from the list and press the "OK" button.

    Near the top of the file, you'll see a element with several elements within it. Most DataSet should only have one element. If you are having trouble like I've described above, you'll have at least two and one will be incorrect. Delete it or otherwise fix it, save the file and reopen normally.

    References:

    https://blog.dmbcllc.com/unable-to-find-connectionfor-object-webconfig/

    Problem to update my dataSet designer : Unable to find connection 'ERMConnectionString (Settings)1'

    Failed to load dataset because of the following error: Unable to find connection ...

    Dataset Designer: "Unable to find connection MyConn (MySettings)1 for object 'MySettings'"

    Unable to find connection 'MyConnName' for object 'Web.config' in Table Adapter configure Properties

提交回复
热议问题