Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# Unit Testing in C# Unit Testing xUnit.net Unit Test Framework

Richard Troester
PLUS
Richard Troester
Courses Plus Student 15,721 Points

xunit extensions don't exist for vs 2017

The xunit test extensions don't show up as available for visual studio community 2017. Do you have any alternative options that would work?

3 Answers

Richard Troester
PLUS
Richard Troester
Courses Plus Student 15,721 Points

I answered my own question. Go into nuget packet manager and select manage nuget packages for solution. Select the browse tag and search for xunit. xunit should show up as a package you can install. As of this post the current version is 2.2.0 and has 6.5 million downloads. Select it and install it in the project.

Radu - Adrian Buha
PLUS
Radu - Adrian Buha
Courses Plus Student 5,535 Points

So, which one should I choose? There's xunit.runner.console, xunit.analyzer, xunit.core...

Marcin Siemion
Marcin Siemion
1,412 Points

I'm using VS2019 and I downloaded the extension from here - https://marketplace.visualstudio.com/items?itemName=BradWilson.xUnitnetTestExtensions - first download and then open it with Visual Studio to install.

I just tried installing the extension from the link above into VS2019 and got a message that it is no longer compatible with VS2019 and may cause it to be unstable.