Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Unhelpful error when #loading a missing nuget package #2249
What You Are Seeing?
What is Expected?
A specific error message that tells the end user what is wrong. In this case, the fact that the NuGet package that build.cake is trying to #load doesn't exist (because the version number is no longer available).
We had this problem happen recently where our own internal Recipe package (maintained on a TeamCity build server) had incremented to newer versions and the version referenced from a project no longer existed in the NuGet feed. The developer was confused as to what they'd done wrong (nothing at all as it turns out - someone else had probably forgot to pin the version build), and the error message didn't give any clues.
What version of Cake are you using?
Are you running on a 32 or 64 bit system?
What environment are you running on? Windows? Linux? Mac?
How Did You Get This To Happen? (Steps to Reproduce)
Create build.cake with the following content
Run standard build.ps1 bootstrapper
Preparing to run build script...
The "One or more errors occurred." message comes from an AggregateException here, where an async method is called syncronously and the underlying exception gets wrapped.
To actually provide the message from the exception thrown in the called async method, that call could be made with