强类型数据集 (.xsd) 错误 VS Community Edition 15.8.1

我将我的 VS 社区版更新到 15.8.1,之后当我尝试在强类型数据集内编辑我的 sql 时出现此错误。


Configure TableAdapter failed


Unable to find connection 'my_connection' for object 'Web.config'.

The connection string could not be found in application settings, 

or the data provider associated with the connection string 

could not be loaded."


紫衣仙女
浏览 156回答 2
2回答

喵喵时光机

我今天早上遇到了同样的问题。有效的是在文本视图中打开 .xsd,然后将“(Web.config)”的每个实例更改为“(Settings)”,并将“AppSettingsObjectName”值也设置为“Settings”。

RISEBY

我通过首先创建一个“新”连接解决了这个问题 - 即我以不同的名称重新创建了连接。然后我进入数据集对象的源代码以查看结果并将其与最初存在的连接字符串进行比较。对我来说,结果是更改了数据集对象的源代码中的代码从: AppSettingsObjectName="Web.config"到: AppSettingsObjectName="MySettings"以及数据集对象源中的每个 ConnectionRef从: ConnectionRef="ConnectionString (Web.config)"到: ConnectionRef="BHBrowserConnectionString (MySettings)"
打开App,查看更多内容
随时随地看视频慕课网APP