-
Notifications
You must be signed in to change notification settings - Fork 361
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
Workaround NuGet breaking change #2165
Conversation
NuGet removed Manifest.Save(Stream, bool) in the latest version. Since NuGet is part of MSBuild our task is forcibly upgraded to the latest version when running in the latest SDK. This results in a missing method exception. Workaround it by calling an API that NuGet didn't remove. This can potentially cause failures in GenerateNuSpec because it will now run Validation, however anyone using the Pack task in our package should already be passing validation since NuGet runs the same validation when reading the Manifest.
I've tested on CoreFx and it fixes building packages with the latest SDK. Our original use of the broken API comes from our use of NuProj, which still has this bug. As I mentioned above, we were still running validation during Pack for all of our scenarios so the risk of a break from this change is pretty low. |
@ericstj Why can't we use the existing PackTask to generate NuSpec? What is it missing? |
(Sorry, closed the PR by accident) |
Just for reference (and for folks doing a callstack search) this is fixing:
That was caused by NuGet/NuGet.Client#2438. We're working around it by calling an API that was not removed. |
Thanks for fixing! |
NuGet removed Manifest.Save(Stream, bool) in the latest version.
Since NuGet is part of MSBuild our task is forcibly upgraded to the
latest version when running in the latest SDK. This results in a
missing method exception.
Workaround it by calling an API that NuGet didn't remove. This can
potentially cause failures in GenerateNuSpec because it will now run
Validation, however anyone using the Pack task in our package should
already be passing validation since NuGet runs the same validation
when reading the Manifest.
Replaces #2004.