错误:此操作将创建一个不正确的结构化文档 [英] error: This operation would create an incorrectly structured document

查看:1072
本文介绍了错误:此操作将创建一个不正确的结构化文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图安装实体框架6,它始终与误差

回滚

 错误:此操作将创建一个不正确的结构化文档。

我已经卸载它在这个位置上提到的每个DLL的所有引用。 <一href=\"http://entityframework.$c$cplex.com/wikipage?title=Updating%20Applications%20to%20use%20EF6\">http://entityframework.$c$cplex.com/wikipage?title=Updating%20Applications%20to%20use%20EF6

疯狂的事情是,我可以创建一个新项目,创建的WebAPI程序,并尝试添加实体框架6,我也得到了同样的错误,甚至删除所有引用为 System.Data.Entity.dll后我已经几天到这一点,需要严重的帮助。

我可以做什么来获得实体框架6安装?

请注意:这将安装只是找到一个类库,只是没有一个的WebAPI或MVC应用程序


如果它帮助这里是一些更详细的错误信息。

  PM&GT;安装封装的EntityFramework -Version 6.0.0
安装的EntityFramework 6.0.0。
安装成功的EntityFramework 6.0.0。
添加的EntityFramework 6.0.0交流。
添加成功'的EntityFramework 6.0.0交流。
System.InvalidOperationException:此操作将创建一个不正确的结构化文档。
   在System.Xml.Linq.XDocument.ValidateDocument(XNode previous,XmlNodeType allowBefore,XmlNodeType allowAfter)
   在System.Xml.Linq.XDocument.ValidateNode(XNode节点,XNode previous)
   在System.Xml.Linq.XContainer.AddNodeSkipNotify(XNode N)
   在System.Xml.Linq.XContainer.AddContentSkipNotify(对象的内容)
   在System.Xml.Linq.XContainer.Add(对象的内容)
   在System.Data.Entity.Migrations.Extensions.XContainerExtensions.GetOrCreateElement(XContainer容器,字符串的ElementName,XAttribute []属性)
   在System.Data.Entity.ConnectionFactoryConfig.ConfigFileManipulator.AddOrUpdateConfigSection(配置的XDocument,版本entityFrameworkVersion)
   在System.Data.Entity.ConnectionFactoryConfig.InitializeEntityFrameworkCommand.<>c__DisplayClass3.<Execute>b__1(XDocument C)
   在System.Data.Entity.ConnectionFactoryConfig.ConfigFileProcessor.ProcessConfigFile(项目项configItem,IEnumerable`1操纵)
   在System.Data.Entity.ConnectionFactoryConfig.InitializeEntityFrameworkCommand.<>c__DisplayClass3.<Execute>b__0(ProjectItem一世)
   在System.Data.Entity.ConnectionFactoryConfig.ConfigFileFinder.FindConfigFiles(ProjectItems项目,Action`1动作)
   在System.Data.Entity.ConnectionFactoryConfig.InitializeEntityFrameworkCommand.Execute()
   在System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(动作命令)
卸载的EntityFramework 6.0.0。
成功卸载的EntityFramework 6.0.0。
安装失败。滚回来...
安装封装:此操作将创建一个不正确的结构化文档。
在行:1字符:16
+安装,包装及LT;&LT;&LT;&LT; -Version的EntityFramework 6.0.0
    + CategoryInfo:NotSpecified:(:) [安装封装]的RuntimeException
    + FullyQualifiedErrorId:NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand


解决方案

在实体框架的升级,在app.config或web.config文件中会得到的东西写进他们。我怀疑这可能是问题所在。看看你的app.config或web.config文件中。也许EF升级有困难而不做无效XML文档写他们。

I keep trying to install the entity framework 6 and it always rolls back with the error of

error: This operation would create an incorrectly structured document.

I've uninstalled all the references to every dll mentioned at this location. http://entityframework.codeplex.com/wikipage?title=Updating%20Applications%20to%20use%20EF6

The crazy thing is that i can create a new project, create a webAPI program, and attempt to add Entity Framework 6 and I get the same error, even after removing all references to System.Data.Entity.dll I'm already a few days into this, and needing serious help.

what can i do to get Entity Framework 6 to install?

Note: It will install just find to a class library just not a WebApi or MVC application.


If it helps here is some more detailed error info.

PM> Install-Package EntityFramework -Version 6.0.0
Installing 'EntityFramework 6.0.0'.
Successfully installed 'EntityFramework 6.0.0'.
Adding 'EntityFramework 6.0.0' to AC.
Successfully added 'EntityFramework 6.0.0' to AC.
System.InvalidOperationException: This operation would create an incorrectly structured document.
   at System.Xml.Linq.XDocument.ValidateDocument(XNode previous, XmlNodeType allowBefore, XmlNodeType allowAfter)
   at System.Xml.Linq.XDocument.ValidateNode(XNode node, XNode previous)
   at System.Xml.Linq.XContainer.AddNodeSkipNotify(XNode n)
   at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
   at System.Xml.Linq.XContainer.Add(Object content)
   at System.Data.Entity.Migrations.Extensions.XContainerExtensions.GetOrCreateElement(XContainer container, String elementName, XAttribute[] attributes)
   at System.Data.Entity.ConnectionFactoryConfig.ConfigFileManipulator.AddOrUpdateConfigSection(XDocument config, Version entityFrameworkVersion)
   at System.Data.Entity.ConnectionFactoryConfig.InitializeEntityFrameworkCommand.<>c__DisplayClass3.<Execute>b__1(XDocument c)
   at System.Data.Entity.ConnectionFactoryConfig.ConfigFileProcessor.ProcessConfigFile(ProjectItem configItem, IEnumerable`1 manipulators)
   at System.Data.Entity.ConnectionFactoryConfig.InitializeEntityFrameworkCommand.<>c__DisplayClass3.<Execute>b__0(ProjectItem i)
   at System.Data.Entity.ConnectionFactoryConfig.ConfigFileFinder.FindConfigFiles(ProjectItems items, Action`1 action)
   at System.Data.Entity.ConnectionFactoryConfig.InitializeEntityFrameworkCommand.Execute()
   at System.Data.Entity.Migrations.MigrationsDomainCommand.Execute(Action command)
Uninstalling 'EntityFramework 6.0.0'.
Successfully uninstalled 'EntityFramework 6.0.0'.
Install failed. Rolling back...
Install-Package : This operation would create an incorrectly structured document.
At line:1 char:16
+ Install-Package <<<<  EntityFramework -Version 6.0.0
    + CategoryInfo          : NotSpecified: (:) [Install-Package], RuntimeException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

解决方案

When Entity Framework is upgraded, the app.config or web.config files will get stuff written into them. I suspect that might be the problem. Take a look at your app.config or web.config files. Maybe the EF upgrade is having trouble writing to them without making an invalid xml document.

这篇关于错误:此操作将创建一个不正确的结构化文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆