In my application project i have used AppDomain.CurrentDomain.BaseDirectory to get the file path. When i include the unit test in my project, the AppDomain.CurrentDomain.BaseDirectory returns unit test project directory instead of my source project while debugg. Can you please let me know how to resolve this issue?
Thanks.
That’s the expected behaviour.
You could consider copying the required files to the unit test directory.
In Visual Studio 2010, look at “Deployment” under “Test Settings”.