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

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


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.