强类型数据集 (.xsd) 错误 VS 社区版 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."

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

我通过首先创建一个"新"连接来解决这个问题 - 也就是说,我以不同的名称重新创建了连接。

然后,我进入数据集对象的源代码以查看结果,并将其与最初存在的连接字符串进行比较。

对我来说,结果是更改了数据集对象的源代码中的代码

寄件人:AppSettingsObjectName="Web.config"

收件人:AppSettingsObjectName="MySettings"

以及数据集对象源中的每个 ConnectionRef。

寄件人:ConnectionRef="ConnectionString (Web.config)"

至:ConnectionRef="BHBrowserConnectionString (MySettings)"

最新更新