【发布时间】:2026-01-01 18:15:01
【问题描述】:
在 Visual Studio 中,我有一个使用 MS Enterprise Library 4.0 应用程序块的 asp.net 3.5 项目。
当我打开我的 web 配置文件时,我的错误列表会填满 99 条消息,其中包含诸如
之类的内容Could not find schema information for the element 'dataConfiguration'.
Could not find schema information for the attribute 'defaultDatabase'.
Could not find schema information for the element 'loggingConfiguration'.
Could not find schema information for the attribute 'tracingEnabled'.
Could not find schema information for the attribute 'defaultCategory'.
如果我关闭 Web.config 文件,它们就会消失(但一旦我需要再次打开文件,它们就会回来)。
经过一番查看,我发现这是因为缺少 Visual Studio 需要的 XSD 或架构文件,以便正确“理解”web.config 文件中的架构并为其提供智能感知。
有谁知道如何为 VS 提供适当的架构信息,或关闭这些消息?
@Franci - 感谢您提供的信息,我已经尝试过该工具以及 MMC 管理单元(它们往往会破坏 Web.config 中的格式),但它们仍然无法解决我收到的恼人警告。感谢您的尝试。
【问题讨论】:
-
嘿,对不起,我帮不了你。如果您希望我删除我的答案以使您的问题显示为未回答,请对答案发表评论,以便我下次登录时可以看到。
-
我通过重启我的视觉工作室解决了这个问题。
标签: .net xml xsd enterprise-library