在 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 中的格式),但它们仍然无法解决我收到的恼人警告。感谢您的尝试。