提问人:Clément 提问时间:4/9/2020 更新时间:4/9/2020 访问量:639
如何在Visual Studio中创建配置文件并使用system.configuration dll?
How to create a configuration file and use system.configuration dll in Visual Studio?
问:
我想将System.Configuration dll用于我的应用程序。 所以我做了这些动作:
- 项目> 添加新元素 > 添加配置文件
但是我在列表中找不到 .exe.config 文件,所以我创建了一个文本文件并将其与我的应用程序的可执行文件 (.exe) 放在同一个文件夹中,它起作用了。我可以将它添加到我的项目中。
- 然后我想导入System.Configuration dll:项目>添加引用
再一次,我在列表中找不到System.Configuration dll,所以我使用了NuGet安装控制台,它起作用了!
`Install-Package System.Configuration.ConfigurationManager -Version 4.5.0`
我的问题是:为什么我在 Visual C# 元素菜单中找不到配置文件,并且我必须创建一个文本文档?
非常感谢您的帮助。 克莱门特
答: 暂无答案
评论
app.config
name.exe.config
app.config
app.config