Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is App.config?

I'm trying to set up logging with Microsoft's Enterprise Library (log4net seems to be a dead project). I'm using VB .NET 2008 and VS 2008. I've searched all over the MSDN documentation, CodePlex docs (including the Hands-On labs that installed and then vanished), and online tutorials to no avail.

They all refer to a mysterious "configuration file" or "App.config" that I can't find and can't seem to add. I even tried adding a new text file and renaming it "App.config" but that only made VS 2008 spit out a red wavy line on a blank file.

Any suggestions for finding the elusive app.config would be greatly appreciated.

(and, if that makes the EntLib configuration tool show up, I'll be absolutely delighted)

Edit: I've been tricked!

The tree in VS 2008 isn't a true superset-subset relationship, which is why I got so frustrated.

To wit, the top of the tree: alt text http://static.zooomr.com/images/7954203_910064e809.jpg

And a 'sub-section' of the tree. alt text http://static.zooomr.com/images/7954204_69e03c8502.jpg

like image 285
Zian Choy Avatar asked Aug 12 '09 16:08

Zian Choy


3 Answers

Im pretty sure you can use web.config if youre in a web app or web solution.

Otherwise, see here

[EDIT] In my VS the app file can be added like: Add new item -> General -> Application Configuration file

like image 113
cwap Avatar answered Sep 30 '22 05:09

cwap


Should be in the same directory as binaries, but you have to add it to your solution first, using Visual Studio window for adding new files to soultion.

Add -> New Item -> Application configuration file
like image 38
smok1 Avatar answered Sep 30 '22 04:09

smok1


You can add an app config file to any vb project by

right clicking on the project -> Add-> New Item -> ...

and selecting either

Application Configuration File

or selecting

Web Configuration File

(for app.config or web.config respectively)

like image 45
Joseph Avatar answered Sep 30 '22 06:09

Joseph