How to determine the solution path from my test code?
I am trying to write tests for the plugin architecture. I have some fake classes that implement my plugin interface in a separate project in my solution. After this build, the dll is copied to the plugins folder using the post-build event:
copy "$(TargetPath)" "$(SolutionDir)TestPlugins"
My test code searches for plugins at this location and uploads plugin types to the collection for future use.
At the moment, I need to hard-code the path to the plugins folder in my test, which is unpleasant.
Oh, and I use Visual Studio's built-in test projects (not NUnit), if that matters.
source share