0
   [TestMethod]
    public void TestUserInheritance()
    {
        var _c = new Controller();

        _c.AddEmployee("Dirk");
        _c.AddUser("Wilma");
        _c.AddProjectmanager("Jens");

        Assert.AreEqual(_c.GetUsers().Count, 3);
    }

The project builds perfect and I'm on .net core 3.1 When I run the tests it just does nothing and throws stuff in the Test Output

     Test data store opened in 0.096 sec.
        [2/29/2020 9:18:48.542 PM] ---------- Discovery started ----------
        Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: Testhost process exited with             
        error: Failed to create CoreCLR, HRESULT: 0x80070057
        . Please check the diagnostic logs for more information.
          at 
    Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowExceptionOnConnectionFailure(Int32 connTimeout)
       at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, String runSettings)

   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.DiscoverTests(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler)
[2/29/2020 9:18:49.386 PM] ========== Discovery aborted: 0 tests found (0:00:00.8389177) ==========

and it also throws this huge error.

[2/29/2020 9:40:40.785 PM] ========== Run aborted: 0 tests run (0:00:00.282598) ==========
StreamJsonRpc.RemoteInvocationException: The following TestContainer was not found 'C:\Users\Refactor\Documents\GIP\Taken\Software\Taak09-19;11;2019\UnitTests\bin\Debug\netcoreapp2.0\UnitTests.dll'
   at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__96`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.TestWindow.Host.TestStoreHandler.<AddSourceBasedTestsAsync>d__23.MoveNext()

I've tried doing a clean->build, restarting vs2019, updating resharper, ... I've also tried updating the needed nuget packages but that didn't have an effect either

3
  • Do you have the Microsoft.NET.Test.Sdk package installed in the project?
    – devNull
    Commented Feb 29, 2020 at 21:14
  • @devNull yes version 16.5.0
    – RefDev001
    Commented Feb 29, 2020 at 22:22
  • Are you trying to test a .NET Core 2.0 assembly with .NET Core 3.x? That's not gonna work by default.
    – yaakov
    Commented Feb 29, 2020 at 22:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.