启用智能感知自定义节在.config文件 [英] Enabling Intellisense for Custom Sections in .config Files

查看:164
本文介绍了启用智能感知自定义节在.config文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当编辑在Visual Studio .NET配置文件(App.config中,web.config文件等),我得到的Visual Studio的智能感知选择我的应用程序的设置时,指导我。如果我添加自定义配置节,我怎么可以启用智能感知我的自定义设置?我敢肯定,必须有一个简单的答案,但一个粗略的谷歌搜索没有给我任何帮助。

When editing .NET config files (app.config, web.config, etc) in Visual Studio, I get Visual Studio's intellisense to guide me when choosing my application's settings. If I add a custom configuration section, how can I enable intellisense for my custom settings? I'm sure there must be an easy answer to this, but a cursory Google search didn't give me any help.

谢谢!

推荐答案

如果您不希望修改的Visual Studio的文件或复制任何东西到Visual Studio文件夹,您可以添加的.xsd 文件到您的项目,打开你的的.config 文件,并选择的架构的在属性的窗口(点击 [...] 图标):

If you do not want to modify your Visual Studio files or copy anything into the Visual Studio folder, you can add the .xsd file to your project, open your .config file and select Schemas in the Properties window (click the […] icon):

这篇关于启用智能感知自定义节在.config文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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