DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
ClassLibrary Projects And App.config
This snippet comes from Jamie Cansdale at TestDriven.net (http://weblogs.asp.net/nunitaddin/archive/2006/06/07/ClassLibrary-Projects-and-App.config.aspx) In Visual Studio .NET 2003 if you want you unit tests to use an app config file you need to ensure a config file exists with the same path as your test assembly but ending with '.config'. Life has improved a bit with Visual Studio 2005 as it will automatically copy any 'App.config' file to the correct place even for ClassLibrary projects. You can achieve the same affect in VS2003 by using the following post-build event:
copy "$(ProjectDir)App.config" "$(TargetPath).config"