Matthew ".NET 247" Reynolds

Matthew Reynolds... software development consultant, author, speaker and trainer

Did anyone else know VS .NET did this?

If you create a file called app.config in your VS .NET project, that app.config folder will be copied to the output folder (e.g. bin\Debug) and renamed target.config, e.g. MyApp.exe.config.

That's a great way of getting .config files into SourceSafe without having to reference the output folder, and a good way of pushing .config files around in developer teams.  Its also a good way of confusing otherwise seasoned developers if they don't know it does it!

Comments

Christian Weyer said:

Yeah - I also like this feature. If they only provided a schema to evaluate the config and help us out with an intellisense feature for config files.
# June 27, 2003 12:50 AM

Sander said:

I never knew this, until I recently decided to create a file called app.config, simply because it would seem obvious when your web-application settings are stored in web.config. It a shame no Framework classes exist for user-settings.
# June 27, 2003 2:56 AM

Andrew Webb said:

Didn't know this, but now glad that I do. Under VS.NET 2002 I placed the application's config file in the target folder manually; it never got deleted. But under VS.NET 2003, it gets deleted every time you hit F5 - unless you create an app.config file. The alternative is to write a post-build event that copies in your config file, but using app.config is much easier. Thanks for pointing this out!
# July 26, 2003 5:48 AM

jan said:

And this works with VS.Net 2002 also! Nice feature.
# July 30, 2003 9:12 AM

Pradeep Ballal said:

fantastic!
# November 10, 2003 2:58 AM

Gunter said:

Great tip. The file being deleted in VS.Net 2003 was very annoying.
# January 2, 2004 4:11 AM

Kris said:

thank the lord!
I agree its a good feature but how are yo suposed to know this!
# February 11, 2004 9:32 PM

Paul Mcilreavy said:

This feature can be potentilly very confusing. not to mention dangerous if you dont know it does it.
# March 11, 2004 4:15 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)