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!

7 Comments

  • 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.

  • 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.

  • 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!


  • And this works with VS.Net 2002 also! Nice feature.

  • Great tip. The file being deleted in VS.Net 2003 was very annoying.

  • thank the lord!

    I agree its a good feature but how are yo suposed to know this!

  • This feature can be potentilly very confusing. not to mention dangerous if you dont know it does it.

Comments have been disabled for this content.