-
Notifications
You must be signed in to change notification settings - Fork 256
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
Custom msbuild sdk results in "Package restore was successful but a package with the ID of "xyz" was not installed" #7817
Comments
After restore, the SDK resolver looks for your SDK based on the restore results: Is the version and ID of the package exactly the same? Maybe the case is different? Can you attach a NUPKG of an SDK that doesn't work? |
From @japj on February 20, 2019 16:32 Yes indeed, casing is the issue here. I can reproduce the problem by:
Thanks for the quick pointer, not sure if there is still an issue that needs to be solved though. |
I think it succeeds the second time because its already downloaded and there's different logic for locating an on disk package versus one that was just fetched. I think the fix is to just add a Thanks for reporting this! |
Right assignee? |
Not really. I have assigned it to myself for now. |
Or rather, you have to. I can't change assignments here. |
I cannot assign to you either. Want me to add you to this repo, or port this issue elsewhere? |
This is a workaround because of an issue in Nuget causing intermittent build rerros in CI pipelines NuGet/Home#7817
From @japj on February 20, 2019 15:16
Steps to reproduce
I am trying to build a custom msbuild sdk, and have published this successfully to a TFS 2018Update3 PackageManagement feed.
However I run into the issue that upon first time use of a new version of this sdk I get a "Package restore was successful but a package with the ID of "xxx" was not installed" error.
I can confirm that the NuGetSDKResolver has downloaded the nuget correctly and placed it in the global nuget cache with the correct version.
If I run the test project through msbuild a second time it succeeds to import sdk.props/targets from the custom sdk.
I have also tried the same with a simple example and "Microsoft.Build.CentralPackageVersions" and this always goes ok on the first try (so I can not replicate the issue with that NuGet sdk).
I have tried comparing contents of these Sdks (and nuget spec files) to see if I can understand why it is going wrong, but I cannot figure out what the exact cause is.
Any information on how to further analysis & fix this issue?
Project file sample2.proj goes wrong (with custom SDK)
Project sample.proj goes ok (with Microsoft.Build.CentralPackageVersions)
The custom SDK has the following relevant MSBuild information in the nuspec:
Environment data
msbuild /version
output:Microsoft (R) Build Engine version 15.8.166+gd4e8d81a88 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
15.8.166.59604
OS info:
Windows 10 1703 (15063.1387)
Copied from original issue: dotnet/msbuild#4190
The text was updated successfully, but these errors were encountered: