在 Class 库中启用迁移的文档错误

The document error for enabling Migration in a Class Library

我刚刚从我的数据库创建了一个 Code First 模型,现在我需要在 application.However 上激活迁移,当我在 Nuget 包管理器中键入 "enable-migrations" 时,我收到此错误:

System.InvalidOperationException: This operation would create an incorrectly structured document. at System.Xml.Linq.XDocument.ValidateDocument(XNode previous, XmlNodeType allowBefore, XmlNodeType allowAfter).....

如果你能帮我解决这个问题,我将不胜感激。

特别感谢:This operation would create an incorrectly structured document

只需删除 web.config 中的 configuration 标签中的 xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"