Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.0.404] "dotnet list package" fails when using CPM #14000

Open
paulomorgado opened this issue Dec 16, 2024 · 1 comment
Open

[8.0.404] "dotnet list package" fails when using CPM #14000

paulomorgado opened this issue Dec 16, 2024 · 1 comment

Comments

@paulomorgado
Copy link

paulomorgado commented Dec 16, 2024

NuGet Product Used

dotnet.exe

Product Version

$ 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:\Program Files\dotnet\sdk]
  8.0.404 [C:\Program Files\dotnet\sdk]
  9.0.101 [C:\Program Files\dotnet\sdk]
  9.0.200-preview.0.24575.35 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 9.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 9.0.0 [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:\Temp\Projects\DotNetListPackages\global.json

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

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

Worked before?

No response

Impact

I'm unable to use this version

Repro Steps & Context

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 in 0,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 in 0,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.

Verbose Logs

No response

@paulomorgado
Copy link
Author

Previously reported at dotnet/sdk#45473

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

No branches or pull requests

1 participant