简体   繁体   中英

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...
        }
    }
}

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM