In vs team system 2008 unit test, how can i load an application configuration file in the test itself?
i have an app.config in the test project, referenced System.Configuration but when running the test, it doesn't see the app.config
In vs team system 2008 unit test, how can i load an application configuration file in the test itself?
i have an app.config in the test project, referenced System.Configuration but when running the test, it doesn't see the app.config
Have a pre-build batch event that copies it across from your app directory.
You can add this by right clicking on your test project (or the app) and clicking Properties. When the page opens select "Build Events" from the menu and enter your command e.g:
xcopy ../app.config ../../Test/bin/app.config
Or maintain a copy yourself.