【问题标题】:Strongly typed dataset (.xsd) error VS Community Edition 15.8.1强类型数据集 (.xsd) 错误 VS Community Edition 15.8.1
【发布时间】:2019-01-26 23:53:15
【问题描述】:

我将 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."

【问题讨论】:

  • FWIW,VS 开发者社区中提到了几个与表适配器及其连接字符串相关的 VS 15.8.x 问题。最重要的是"Table Adapter not using connection strings in web.config",我强烈建议遇到此问题的每个人都给它投票。
  • 大家好,我尝试了最新版本的 VS 社区版,现在一切正常。

标签: c# visual-studio xsd dataset


【解决方案1】:

我今天早上遇到了同样的问题。什么工作是在文本视图中打开.xsd,然后将“(web.config)”的每个实例更改为“(设置)”,并将“appsettingsobjectname”值设置为“设置”。 p >

【讨论】:

  • 我认为这是唯一的方法。现在我降级了我的与谢谢!
  • 不幸的是,这没有对我做的伎俩。仍然需要降级。 span>
【解决方案2】:

我通过首先创建一个“新”连接解决了这个问题 - 即我以不同的名称重新创建了连接。

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

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

发件人:AppSettingsObjectName="Web.config"

收件人:AppSettingsObjectName="MySettings"

还有数据集对象源中的每个 ConnectionRef

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

收件人:ConnectionRef="BHBrowserConnectionString (MySettings)"

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-12-08
    • 1970-01-01
    • 2011-06-22
    • 2017-08-26
    • 2017-03-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多