I have to reference the test adapter DLL (xunit.runner.visualstudio.testadapter.dll
) in our vNext Visual Studio Online build to execute the tests.
The problem is that with the new DNX structure, packages are being restored to C:\Users\{user}\.dnx\packages
and are not relative to the project's path anymore.
How can I reference this location in the build?
We are using the hosted build agent.
I think the answer for your question can be found in the following StackExchange answer: Running unit tests in TFS/VSO Build vNext using xUnit adapter. Then the packages end up in a local directory and not the global .dnx cache.
...
Make a global.json file and put the following into it:
{
"packages": "packages"
}
That will force your dnu restore to put the packages into .\packages\, which will hopefully solve the problem.