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#

Thomas L
Thomas L
7,703 Points

Unit Testing for VS2017 on Mac not working.

I do not have the "Create Unit Test" button which add some complexity when it comes to create Unit Tests.

The second solution I found is to create a test project manually by adding a new project to my solution, however, nothing I try seems to work.

1.xUnit Test Project under the .NET Core Section will totally destroy my app. Error message: "Predefined type 'System.Object' is not defined or imported"

2.xUnit.net v2 Library Project and NUnit Library Project act like they do not know any classes that I'd like to test. (Yes, I tried to import my project that I'd like to test in the using of my test project)

2.1Special mention for xUnit.net v2 Library Project which ask me to update my NuGet Packages and does not recognise xUnit after. (Got an error saying that "using <Xunit>" is not required)

Am I missing something? Did you manage to follow the videos on Unit Testing from your Mac?

Thanks in advance.

PS: This question is about this video https://teamtreehouse.com/library/our-first-test

1 Answer