Skip to content

A package reference to ASP.NET Core 3.0 breaks the test host #1892

@JamesNK

Description

@JamesNK

Steps to reproduce

  1. Install .NET Core SDK 3.0 preview 1
  2. Open attached project - nunittest.zip
  3. Run dotnet test in test directory

Expected behavior

Tests run

Actual behavior

The presence of <PackageReference Include="Microsoft.AspNetCore.App" Version="3.0.0-preview-18579-0056" /> in the test project causes the following error:

C:\Development\Temp\nunittest\PrimeService.Tests> dotnet test
Build started, please wait...
Build completed.

Test run for C:\Development\Temp\nunittest\PrimeService.Tests\bin\Debug\netcoreapp3.0\PrimeService.Tests.dll(.NETCoreApp,Version=v3.0)
Microsoft (R) Test Execution Command Line Tool Version 15.9.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
Testhost process exited with error: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. The system cannot find the file specified.
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.JsonDataSerializer..ctor()
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.JsonDataSerializer.get_Instance()
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.TestRequestHandler..ctor(TestHostConnectionInfo connectionInfo)
   at Microsoft.VisualStudio.TestPlatform.TestHost.DefaultEngineInvoker.Invoke(IDictionary`2 argsDictionary)
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Run(String[] args)
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(String[] args)


Test Run Aborted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions