Link to home
Start Free TrialLog in
Avatar of Michael Sterling
Michael SterlingFlag for United States of America

asked on

What is the easiest way to generate / create an app.config file for a C# console application?

I'm new to console applications. I've been tasked to creating one in C# that is modeled off of a similar app written in VB. Since I've been doing web applications this far i didn't have to worry about the "web.config" file as it was automatically generated. I'm not sure of the base way to create or generate a app.config file for a console application. I'm sure i'll need to edit it for my needs but i just need the "base" of or the basic app.config file. Any help or links would be appreciated. I'm using VS 2010...
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

right-click your project, select Add, new item and "Application Configuration File"
Avatar of Michael Sterling

ASKER

when i do that "Application Configuration File is not an option for some reason...that's what's confusing...
which edition of VS2010 do you have?
because I have the Pro it is definitely there
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
so i just created the app.Config manually and added it. I've added the "using System.Configuration" statement at the top of my main class. However it doesn't seem to recognize this:

ConfigurationManager

in my code as I try to reference the config file and it's nodes / subnodes, any ideas?
and i did find it going under the project menu item,...thanks.
i found it thanks for your input. it's not "ConfigurationManager" in a console application, it's "ConfigurationSettings".
thanks