Search code examples
.nettfsbuildxunit.netnuget-package-restore

Having trouble enabling the NuGet version of XUnit.NET on Team Build 2013


I would like to use Xunit as a test framework. I've created test project, added two nuget packages (xunit and xunit.runner.visualstudio) and everything works great. Visual Studio discover tests.

But how can I configure TFS 2013 build to discover that tests? What's the proper way to do that? I found a lot of tips but I think all are related to old test runner which was downloaded as Visual Studio Extensions instead of the current NuGet package.


Solution

  • Finally I resolve that problem. xUnit didn't work with build because NuGet restore was called too late. It should be called before running MSBuild on solution. Detailed description can be found on the Nuget Documentation website.

    After applying that solution it just works without installing VS or any other 3rd party extensions on build server.