VS for Mac Unable to Run or Debug Unit Tests

TechAuthTechAuth GBUniversity ✭✭

Since we upgraded to newer versions of VS for Mac we are having problems running and debugging unit tests.

Are unit tests are written using NUnit 3 as .NET Core console applications.

The VS version information is:

=== Visual Studio Community 2019 for Mac ===
Version 8.2.1 (build 19)
Installation UUID: 095bc177-91e0-430d-9493-c9a96fe0c9ce
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 5.14.0.85 (d16-2-fix-mac-updates / 86973979)
Package version: 600000311
=== Mono Framework MDK ===
Runtime:
Mono 6.0.0.311 (2019-02/494641b300c) (64-bit)
Package version: 600000311
=== NuGet ===
Version: 5.1.0.6013
=== .NET Core ===
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.2.6
2.2.2
2.1.9
2.1.2
SDK: /usr/local/share/dotnet/sdk/2.2.301/Sdks
SDK Versions:
2.2.301
2.2.104
2.1.505
2.1.302
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/6.0.0/lib/mono/msbuild/Current/bin/Sdks

We have also seen similar issues using 8.1.5 but not on 8.0.6.

We either see test projects fail to load, the run and debug options being greyed out or simply not in the menu at all.


Answers

  • mattwardmattward GBMember Xamurai

    Would you be able to create a small sample solution that reproduces this?

    Any errors in the IDE log? (Help - Open Log Directory).

  • RossGilbertRossGilbert USUniversity

    I had the issue where the Debug Test option had disappeared entirely. Updating to latest version of Visual Studio and removing .vs files did not solve this, but a complete uninstall and re-installation of the latest version resolved the issue for me.

Sign In or Register to comment.