简体   繁体   English

在Visual Studio Professional 2017中添加app.config(应用程序配置文件)

[英]Adding app.config (Application Configuration File) in Visual Studio Professional 2017

I can't get the Application Configuration File template to show up under my Add > New Item > Visual C#. 我无法在我的添加>新项> Visual C#下显示应用程序配置文件模板。 I've run a repair. 我做了修理。 I've uninstalled and reinstalled. 我已经卸载并重新安装。 I've deleted and added Cache folders. 我删除并添加了缓存文件夹。 I've run devenv.exe /InstallVSTemplates. 我运行了devenv.exe / InstallVSTemplates。 Nothing is working. 什么都行不通。 If anyone can tell me specifically what installation elements I should be including, and specifically what type of Project I need to start that might help. 如果有人能够具体告诉我我应该包括哪些安装元素,特别是我需要启动哪种类型的项目可能会有所帮助。 I want to create a simple .Net Web Form in .Net and C# and need to include an app.config file. 我想在.Net和C#中创建一个简单的.Net Web表单,并且需要包含一个app.config文件。

When you create a new project (depending on the type of project like a web application for example) it will automatically create a template app.config file. 当您创建新项目时(例如,根据项目类型,例如Web应用程序),它将自动创建模板app.config文件。

Worst case just make a txt file in notepad and call it [Appname].config 最坏的情况只是在记事本中创建一个txt文件并将其命名为[Appname] .config

Another way would be to go in the project properties, then the Settings tab. 另一种方法是进入项目属性,然后进入“设置”选项卡。 If there are no settings yet, a link should exist in the middle of the empty tab to create a default setting file. 如果还没有设置,则空选项卡中间应存在一个链接以创建默认设置文件。 Add one Application or User setting and save. 添加一个应用程序或用户设置并保存。 Among other things a config file will be created for you too. 除此之外,还将为您创建配置文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Visual Studio for mac 中为控制台应用程序添加 app.config 文件 - Add app.config file for console application in Visual studio for mac 向App.config文件添加配置时出错 - Error when adding a configuration to App.config file 如何在.NET应用程序中使用自定义配置文件或app.config - How to use custom configuration file or app.config in .NET application 我在Visual Studio 2015中找不到app.config文件 - I didnt find app.config file in visual studio 2015 已安装应用程序的 Visual Studio app.config 文件数据库路径 - Visual studio app.config file database path for installed apps Visual Studio 2008自动化测试项目可以读取诸如app.config之类的配置文件? (C#.NET) - A Visual Studio 2008 automated tests project can read a configuration file like app.config? (C# .NET) 配置(app.config或web.config)在Visual Studio 2012中未显示智能感知 - configuration(app.config or web.config) is not showing intellisense in visual studio 2012 Visual Studio 2012测试项目正在从machine.config而非从app.config加载配置设置 - visual studio 2012 test project is loading configuration settings from machine.config but not from app.config 在 Visual Studio 中重建 app.config? - Rebuilding app.config in visual studio? 如何在 Visual Studio Web 2013 中添加 app.config 或 web.config 文件? - How can I add an app.config or web.config file in Visual Studio Web 2013?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM