Skip to content

'dotnet test' broken after upgrading .NET SDK from 7.0.302 to 8.0.100 #38473

Closed

Description

Describe the bug

dotnet test fails with the following error after upgrading to the .NET 8 SDK:

  An assembly specified in the application dependencies manifest (testhost.deps.json) was not found:
    package: 'NuGet.Frameworks', version: '6.5.0'
    path: 'lib/netstandard2.0/NuGet.Frameworks.dll'
. Please check the diagnostic logs for more information.

To Reproduce

git clone https://devdiv@dev.azure.com/devdiv/DevDiv/_git/VS.CloudCache
cd VS.CloudCache
git checkout f89f466
cd test\Microsoft.VisualStudio.Cache.Tests
dotnet test

It works.

Now change global.json at the repo root to consume 8.0.100 of the .NET SDK:

-    "version": "7.0.302",
+    "version": "8.0.100",

Run dotnet test again, and it'll fail:


  Determining projects to restore...
  Restored C:\Users\andarno\source\repos\VS.CloudCache\src\Microsoft.VisualStudio.Cache\Microsoft.VisualStudio.Cache.csproj (in 2.25 sec).
  Restored C:\Users\andarno\source\repos\VS.CloudCache\test\Microsoft.VisualStudio.Cache.Tests\Microsoft.VisualStudio.Cache.Tests.csproj (in 4.23 sec).
  Microsoft.VisualStudio.Cache -> C:\Users\andarno\source\repos\VS.CloudCache\bin\Microsoft.VisualStudio.Cache\Debug\net6.0-windows10.0.19041\Microsoft.VisualStudio.Cache.dll
  Microsoft.VisualStudio.Cache.Tests -> C:\Users\andarno\source\repos\VS.CloudCache\bin\Microsoft.VisualStudio.Cache.Tests\x64\Debug\net6.0-windows10.0.19041\win-x64\Microsoft.VisualStudio.Cache.Tests.dll
Test run for C:\Users\andarno\source\repos\VS.CloudCache\bin\Microsoft.VisualStudio.Cache.Tests\x64\Debug\net6.0-windows10.0.19041\win-x64\Microsoft.VisualStudio.Cache.Tests.dll (.NETCoreApp,Version=v6.0)
Microsoft (R) Test Execution Command Line Tool Version 17.8.0 (x64)
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
Testhost process for source(s) 'C:\Users\andarno\source\repos\VS.CloudCache\bin\Microsoft.VisualStudio.Cache.Tests\x64\Debug\net6.0-windows10.0.19041\win-x64\Microsoft.VisualStudio.Cache.Tests.dll' exited with error: Error:
  An assembly specified in the application dependencies manifest (testhost.deps.json) was not found:
    package: 'NuGet.Frameworks', version: '6.5.0'
    path: 'lib/netstandard2.0/NuGet.Frameworks.dll'
. Please check the diagnostic logs for more information.

Test Run Aborted.

Build FAILED.
    0 Warning(s)
    0 Error(s)

I have no idea why it would fail like this, considering this test has no NuGet.Frameworks dependency at all. And I can't find a testhost.deps.json file in the output directory either.

dotnet --info output in details:

dotnet --info .NET SDK: Version: 8.0.101 Commit: 6eceda187b Workload version: 8.0.100-manifests.077a4f18

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22621
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.101\

.NET workloads installed:
Workload version: 8.0.100-manifests.077a4f18
[aspire]
Installation Source: VS 17.10.34601.30, VS 17.10.34531.228
Manifest Version: 8.0.0-preview.1.23557.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0-preview.1.23557.2\WorkloadManifest.json
Install Type: Msi

Host:
Version: 8.0.1
Architecture: x64
Commit: bf5e279d92

.NET SDKs installed:
6.0.418 [C:\Program Files\dotnet\sdk]
7.0.115 [C:\Program Files\dotnet\sdk]
7.0.203 [C:\Program Files\dotnet\sdk]
7.0.312 [C:\Program Files\dotnet\sdk]
7.0.405 [C:\Program Files\dotnet\sdk]
8.0.101 [C:\Program Files\dotnet\sdk]
8.0.200-preview.24060.48 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.26 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
C:\Users\andarno\source\repos\VS.CloudCache\global.json

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions