I've a classic csproj with PackageRef which depends on a net standard library. Restore throw error:
Error occurred while restoring NuGet packages: Exception from HRESULT: 0x8004C738
Sample solution attached:
ClassLibrary2.zip
the issue here is not related to net standard library, a classic csproj with PackageRef and ProjectRef always hit this issue. the root cause is from https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Clients/PackageManagement.VisualStudio/EnvDTEProjectAdapter.cs#L346
nuget is trying to get all assert metadata from project references, if any assert(IncludeAssets, ExcludeAssets, PrivateAssets) metadata is not there, it will throw.
@jainaashish mentioned in his PR https://github.com/NuGet/NuGet.Client/pull/1058, this will not throw if there aren't any metadata last month, so I think it looks like a reference6.GetMetadata() API breaking change.
I wrote a test vsix project which access the reference6 API, it will repro this issue.
Repro Steps:
It will get Hresult exception.
Test Vsix Project:
@zhili1208 - can you try the repro case in vsfeedback item 744468 -- to see if that is the same exception message.
(note - once you choose tools/options, after the steps above, you can crash)
checked the exception message and call stack, it's the same issue
tracking internal bug on partner team: 372804:legacy csproj project with packagereference and projectreference will throw hresult during restore
Since I can't comment on the internal bug, this is happening in Visual Studio 2017 build 4.6.01038 with Nuget 4.0.0 when simply creating a new .Net Core web app. The error is thrown when I try to open the Nuget Package Manager GUI.
Hello Guys, somebody closed my reported issue and decided my issue was a duplicate of your's; as it is closed, I can't comment. https://developercommunity.visualstudio.com/content/problem/15458/0x8004c738-when-trying-to-update-nuget-packages-in.html
My issue was related to a legacy MVC project and has nothing to do with a dotNET core;
They wrote there is a solution but I can't find it here...
Anyone who can explain what is the status on this issue ?
Thanks and cheers
-Vince
@vRITHNER actually this issue is related to a legacy c# project which is using package reference. the fix is already merged last Friday.
Txs @Zhi, but I already installed last update.
Sent from my Windows 10 phone
From: Zhi Linotifications@github.com
Sent: Monday, January 30, 2017 7:55 PM
To: NuGet/HomeHome@noreply.github.com
Cc: Vincent RITHNERvrithner@hotmail.com; Mentionmention@noreply.github.com
Subject: Re: [NuGet/Home] Error while restoring NuGet packages with HRESULT 0x8004C738 (#4326)
@vRITHNER actually this issue is related to a legacy c# project which is using package reference. the fix is already merged last Friday.
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
https://github.com/NuGet/Home/issues/4326#issuecomment-276155036
validated it with VS 26205 and nugget 4.0.0.2275