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

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

问题描述

在 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 文件并在 Properties 窗口中选择 Schemas(单击 [...] 图标):

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天全站免登陆