Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to add app.config file in Visual Studio 2017?

Working in Visual Studio 2017; I have added a class library in my project. Now I want to add an app.config file.

When I try to add by "Add new Item" but config file is missing from item list.

How can I do it?

like image 441
GOPAL SHARMA Avatar asked May 04 '18 17:05

GOPAL SHARMA


2 Answers

You probably forgot to install workload .NET desktop development.

Go to installation, click to modify and include the workload .NET desktop development.

Check image of installation screen

like image 104
Rafael Avatar answered Nov 11 '22 11:11

Rafael


Just right click your class library. Click on Add -> New Item and you should find Application Configuration file ClassLibraryProject ApplicationConfigFile

Note: If you have a solution without any project or all project are unloaded, you would not find the Application Configuration File

If you are missing visual studio templates,then Close all instance of Visual Studio and Open visual studio command prompt and type,

devenv /installvstemplates

Press Enter. Let the process be complete and now open visual studio. You will get all missing templates under Visual Studio installed templates.

like image 2
Akshay Bheda Avatar answered Nov 11 '22 11:11

Akshay Bheda