在.config文件中为自定义部分启用Intellisense [英] Enabling Intellisense for Custom Sections in .config Files

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

问题描述

在Visual Studio中编辑.NET配置文件(app.config,web.config等)时,我选择Visual Studio的intellisense来指导我选择我的应用程序的设置。如果我添加自定义配置部分,如何为我的自定义设置启用智能感知?我确定这里必须有一个简单的答案,但粗略的谷歌搜索没有给我任何帮助。

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 c / c>文件,并在 属性中选择 窗口(点击 [...] 图标):

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文件中为自定义部分启用Intellisense的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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