Question

I have some unit tests that I wrote using NUnit and to get things going, I had originally used my local file paths for the files I load in for the tests, written out explicitly. All the tests passed with flying colors after they were all finished. Then, to push to the main repo, I changed the paths to relative paths. Now the tests fail both locally and on the main repo. A DLL that never had any trouble being loaded in with an explicitly written file paths is now unable to be loaded, yet the paths are the same as before. Can anyone think of why relative paths as a string instead of an explicit file path being used would make a difference as to whether a certain DLL can be found or not? Thanks!

Update

I have played around with running the tests using TestDriven and Visual Studio's test runner and Test Driven does allow the tests to run. The relative paths don't seem to give it too much trouble. It is when I use Visual Studio's test runner that I run into issues. Could the DLL's not being found be in a different location based on the test runner I use?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top