Search code examples
c#visual-studio-2017xunitxunit.net

XUnit tests don't run (endless loop)


I have a "EMPTY" "[Fact]" / UnitTest method that doesn't run.

  • Win10, x64.
  • .NET Core SDK 2.2.104
  • xUnit proj includes a .NET Standard 2.0 lib
  • VS 2017 15.9.8

Click run all tests or try to debug and the green progress bar at the top in VS just keeps doing it waiting green pan. I have tried deleting all NuGet packages, clean builds etc.

Is there some other cache folder I could try deleting? This is road blocking me.

Example:

using System;
using Xunit;

namespace Audio.Test
{
    public class Test_AudioSystem
    {
        [Fact]
        public void GetAllAudioDevices()
        {
            // does nothing...
        }
    }
}

Solution

  • Ok found the issue. Have Newtonsoft.Json.dll from a .NET Framework project in the same directory as my test libraries. This is somehow causing an endless loop. The question is does this bug happen with a .NET Core version of Newtonsoft.