You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Central Package Management with SDK 8.0.404, dotnet list package fails with:
Unable to read a package reference from the project `{project path}`. Please make sure that your project file and project.assets.json file are in sync by running restore.
To Reproduce
Create a solution with Central Package Management:
$ dotnet new packagesprops
The template "MSBuild Directory.Packages.props file" was created successfully.
$ dotnet new globaljson --sdk-version 8.0.400--roll-forward latestFeature --force
The template "global.json file" was created successfully.
$ dotnet new sln
The template "Solution File" was created successfully.
$ dotnet new classlib --name ClassLib1
The template "Class Library" was created successfully.
Processing post-creation actions...
Restoring C:\Temp\Projects\DotNetListPackages\ClassLib1\ClassLib1.csproj:
Restore complete (0,7s)
Build succeeded in0,9s
Restore succeeded.
$ dotnet sln add ClassLib1
Project `ClassLib1\ClassLib1.csproj` added to the solution.
$ dotnet list package --verbosity diag
Unable to read a package reference from the project `C:\Temp\Projects\DotNetListPackages\ClassLib1\ClassLib1.csproj`. Please make sure that your project file and project.assets.json file are in sync by running restore.
$ dotnet restore --force
Restore complete (0,6s)
Build succeeded in0,6s
$ dotnet list package --verbosity diag
Unable to read a package reference from the project `C:\Temp\Projects\DotNetListPackages\ClassLib1\ClassLib1.csproj`. Please make sure that your project file and project.assets.json file are in sync by running restore.
The same scenario works with SDK 9.0.100.
Further technical details
$ dotnet --info
.NET SDK:
Version: 8.0.404
Commit: 7b190310f2
Workload version: 8.0.400-manifests.4d7d414a
MSBuild version: 17.11.9+a69bbaaf5
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19045
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\8.0.404\
.NET workloads installed:
Configured to use loose manifests when installing new manifests.
[aspire]
Installation Source: SDK 8.0.400, VS 17.13.35605.110, VS 17.12.35527.113
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: FileBased
Host:
Version: 9.0.0
Architecture: x64
Commit: 9d5a6a9aa4
.NET SDKs installed:
6.0.428 [C:\ProgramFiles\dotnet\sdk]
8.0.404 [C:\ProgramFiles\dotnet\sdk]
9.0.101 [C:\ProgramFiles\dotnet\sdk]
9.0.200-preview.0.24575.35 [C:\ProgramFiles\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.27 [C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.36 [C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.16 [C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.2 [C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.11 [C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.0 [C:\ProgramFiles\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.27 [C:\ProgramFiles\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.36 [C:\ProgramFiles\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.16 [C:\ProgramFiles\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.2 [C:\ProgramFiles\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.11 [C:\ProgramFiles\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.0 [C:\ProgramFiles\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.27 [C:\ProgramFiles\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\ProgramFiles\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.16 [C:\ProgramFiles\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.2 [C:\ProgramFiles\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.11 [C:\ProgramFiles\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.0 [C:\ProgramFiles\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\ProgramFiles (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
C:\Temp\Projects\DotNetListPackages\global.json
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
The text was updated successfully, but these errors were encountered:
Describe the bug
When using Central Package Management with SDK 8.0.404,
dotnet list package
fails with:To Reproduce
Create a solution with Central Package Management:
The same scenario works with SDK 9.0.100.
Further technical details
The text was updated successfully, but these errors were encountered: