I run tests via nunit3-console (v3.16.2). The value of AppDomain.CurrentDomain.BaseDirectory in the test will be the path to the directory from where the console runner is essentially launched. I can't use TestContext because of the call to AppDomain.CurrentDomain.BaseDirectory is used in a third-party library.
About csproj:
- net6.0
- nuget Nunit v3.13.3
- nuget NUnit3TestAdapter v4.3.1
Command: C:\NUnit.Console-3.16.2\bin\nunit3-console.exe C:\src\solution\Test.Project\bin\Test.Project.dll
Value of AppDomain.CurrentDomain.BaseDirectory: C:\NUnit.Console-3.16.2\bin\agents\net6.0\
Question: Maybe someone knows a workaround