-
Notifications
You must be signed in to change notification settings - Fork 258
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
Comments
Previously reported at dotnet/sdk#45473 |
I'm not able to repro with the given steps. Is this a consistent repro? |
Strange. I just tried the exact same repro and I didn't have any problems now. If it ever happens in the future, how can I diagnose it? Are there any logs I can collect? Update: On this test I didn't have CPM enabled. |
I think a PerfView or dotnet-trace trace would help. I'm hoping that an ETW/EventSource event will be captured for exceptions, so we can get more information about what exactly failed to load/read. You could also try Sysinternals' procmon to see if Windows is reporting any errors trying to open files, given the error message you were seeing. Also, check that Something else to check is to make sure you don't have any Directory.Packages.props, Directory.Build.props or Directory.Build.targets files in any parent directory. From memory restore tells MSBuild to ignore invalid imports (I don't know why), whereas other commands probably don't. Trying a |
Or TTD. 😄 Is there any extended logging I can get out of it, I guess the best option is just get the commit for that version and debug it. |
Procmon shows access to the right path: λ dir project.assets.json -r | % FullName
C:\Temp\Projects\DotNetListPackages\ClassLib1\obj\project.assets.json I one of my Windows 11 PCs, procmon doesn't even show access to λ dir "C:\Program Files\dotnet\sdk\8.0.404\NuGet.CommandLine.XPlat.dll" | % VersionInfo | fl *
FileVersionRaw : 6.11.1.2
ProductVersionRaw : 0.0.0.0
Comments : NuGet executable wrapper for the dotnet CLI nuget functionality.
CompanyName : Microsoft Corporation
FileBuildPart : 1
FileDescription : NuGet.CommandLine.XPlat
FileMajorPart : 6
FileMinorPart : 11
FileName : C:\Program Files\dotnet\sdk\8.0.404\NuGet.CommandLine.XPlat.dll
FilePrivatePart : 2
FileVersion : 6.11.1.2
InternalName : NuGet.CommandLine.XPlat.dll
IsDebug : False
IsPatched : False
IsPrivateBuild : False
IsPreRelease : False
IsSpecialBuild : False
Language : Language Neutral
LegalCopyright : © Microsoft Corporation. All rights reserved.
LegalTrademarks :
OriginalFilename : NuGet.CommandLine.XPlat.dll
PrivateBuild :
ProductBuildPart : 0
ProductMajorPart : 0
ProductMinorPart : 0
ProductName : NuGet
ProductPrivatePart : 0
ProductVersion : 6.11.1-rc.2+5469bd0d9de8108f15f21644759773b85471366c.5469bd0d9de8108f15f21644759773b85471366c
SpecialBuild : |
The exception seems to be thrown here: https://github.com/NuGet/NuGet.Client/blob/6.11.1.2/src/NuGet.Core/NuGet.CommandLine.XPlat/Utility/MSBuildAPIUtility.cs#L814 But when I try to run it, I get:
|
Used procdump to capture first chance exceptions and got this:
The |
If there are no package references, the cause is another:
|
NuGet Product Used
dotnet.exe
Product Version
Worked before?
No response
Impact
I'm unable to use this version
Repro Steps & Context
Create a solution with Central Package Management:
The same scenario works with SDK 9.0.100.
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: