简体   繁体   English

无法将输入的xml文件内容转换为数据集。 找不到要求的值'ConnectionStrings'

[英]Unable to convert input xml file content to a DataSet. Requested value 'ConnectionStrings' was not found

I have a problem with the visual studio. 我的视觉工作室有问题。 I user visual studio 2015 and choose framework 4.5 and create an empty website. 我使用Visual Studio 2015,选择框架4.5,然后创建一个空网站。 then I add Dataset.xsd to my project (in App_Code) and then by using server explorer I add my database tables to the dataset. 然后将Dataset.xsd添加到我的项目中(在App_Code中),然后使用服务器资源管理器将数据库表添加到数据集中。 with drag and drop it makes connection string in web.config and when I Build solution I get this Error. 通过拖放它使连接字符串在web.config中,当我构建解决方案时出现此错误。 I attached a screenshot. 我附上了截图。 Attention: I used this method many times and I have no problem before, but recently I get Error. 注意:我多次使用此方法,以前没有问题,但是最近出现错误。 Please Help ME. 请帮我。 Thanks. 谢谢。

Below article discusses options about loading the contents of a DataSet from an XML From Microsoft: 下面的文章讨论了有关从Microsoft的XML加载数据集的内容的选项:

[Link] [链接]

Kindly refer to it, and if didn't help here is a microsoft community forums that discussed this issue 请参考,如果没有帮助,这里是一个讨论此问题的微软社区论坛

[Link 2] [链接2]

the problem is in DataSet.xsd file with TableAdapter's connection string which you've added in Dataset by drag and drop. 问题出在带有TableAdapter的连接字符串的DataSet.xsd文件中,您已经通过拖放将其添加到了Dataset中。

  1. open DataSet.xsd file in xml editor 在xml编辑器中打开DataSet.xsd文件
  2. remove connection string which have property AppSettingsObjectName="web.config" 删除具有属性AppSettingsObjectName =“ web.config”的连接字符串
  3. again open the Dataset with normal editor. 再次使用普通编辑器打开数据集。
  4. now delete the TableAdapter which you have added by drag and drop 现在删除通过拖放添加的TableAdapter
  5. Add the TableAdapter again in dataset by right click option See Here 通过右击选择在数据集中再添加TableAdapter的看这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM