ClassLibrary Projects and App.config

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"

2 Comments

Comments have been disabled for this content.