visual-studio 将 XML 架构添加到 Visual Studio
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1822454/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Add an XML schema to Visual Studio
提问by Anthony Mastrean
I want Intellisensesupport when writing App.config sections or XML configuration files for components like NHibernate, log4net, or Unity. What options do I have to get Visual Studio to find these files and load Intellisense?
在为 NHibernate、log4net 或 Unity 等组件编写 App.config 部分或 XML 配置文件时,我需要Intellisense支持。我必须使用哪些选项才能让 Visual Studio 找到这些文件并加载 Intellisense?
(Assume we have the schema file.)
(假设我们有架构文件。)
回答by JaredPar
Yes it is possible to do this. You need to associate the schema with the document and the XML editor will then provide intellisense. The following links go over how to achieve this
是的,可以这样做。您需要将架构与文档相关联,然后 XML 编辑器将提供智能感知。以下链接介绍了如何实现这一目标
回答by Kyle B
Open your config file, under the properties window for your config file there is a section called 'Schemas', add your schema there.
打开您的配置文件,在您的配置文件的属性窗口下有一个名为“架构”的部分,在那里添加您的架构。

