For example, if you're building a Visual Studio solution in Azure Pipelines, your build pipeline should include a Visual Studio Test task. After your build starts, this task automatically runs all the unit tests in your solution - on the same build machine. All tests are running, all tests are showing the right test outcome. Now a coworker told me, that the tests are not running on his machine using the Visual Studio test explorer. They are not working either on my machine, so i can exclude some local missing files or something. A workaround for this should be to add a xunit.runner.visualstudio PackageReference to the MyUnitTestProj project. Currently the VS Test adapter in Visual Studio for Mac, incorrectly, only considers projects that have a NuGet package reference that contains a test adapter. Visual Studio Mac git switch branch problems Many times (more often than not, but not 100% of the time) when switching between branches, VS Mac w. In the current version of Visual Studio for Mac there is “Add file” template for xUnit Unit-Tests. Nice and easy. But how to run these tests? The problem is, that the default installation of Visual Studio for Mac does not discover these xUnit Tests even if you do a full rebuild. Visual Studio Mac is a mobile-first, cloud-first IDE. Everything you need for mobile, cloud and Mac development. Code, debug, and test these cloud services simultaneously with your client solutions for increased productivity. Build cross-platform games. Using Unity and Visual Studio for Mac, you can create awesome games that run on any.
I am currently evaluating Visual Studio for Mac. And I ran into a little problem. It won't detect any of my xUnit unit tests. On the Windows version of VS, the tests are automatically picked up when I click on 'Run all Tests'. But with this version, it's not. Are there any instructions on how to setup xUnit to work inside Visual Studio for Mac?
Thanks for the help! ;0)
ZorthgoZorthgo4 Answers
[Update: 2018-04-11]
Visual Studio for Mac now has built-in support for xUnit.
[Original Post]
Ok, so for anyone searching for this. Basically Visual Studio for Mac is not currently compatible with xUnit. I spoke to the xUnit core team, and they have no plans on supporting Visual studio for Mac. You can follow the conversation HERE. I also spoke to the xamarinstudio.xunit plugin team. And they said that they are planning on supporting it if VS for Mac doesn't out of the box. But that we will have to wait a little bit to see what the requirements are. You can follow the conversation HERE
ZorthgoZorthgoVisual Studio for Mac now has a built in support for xUnit (Just create a new project in your solution, and under the .NET Core project type you'll see a Tests project that you can add and write tests with)

Let me know if this worked out for you
Jonathan PerryJonathan PerryVersion 2.3.1 of xUnit seemed to solve a lot of issues I had both with Live Unit testing in VS2017 and some issues with VS for Mac as well.
With the latest version of VS for mac (7.1) With .Net Core 2.0 support - you can now run the tests and see them in the 'Test Results' window, available in the BRHS of the IDE.
You will need to select the project from the top left hand drop down - ensure that it is: ' - Unit tests'
You can then run using the Run button and the results will be displayed in the window above.

Visual Studio For Mac Free
