Select to view content in your preferred language

NuGet restore failing for CrowdPlannerTool sample

05-10-2019 02:50 PM
Occasional Contributor II

I opened the solution for the CrowdPlannerTool sample in VS 2017. As expected, VS tells me a NuGet package is missing. Step 4 of the instructions says to install the package using

Install-Package System.Windows.Controls.DataVisualization.Toolkit

When I try this, I get:

PM> Install-Package System.Windows.Controls.DataVisualization.Toolkit
Install-Package : Some NuGet packages are missing from the solution. The packages need to be restored in order to build the dependency graph. Restore the packages before 
performing any operations.
At line:1 char:1
+ Install-Package System.Windows.Controls.DataVisualization.Toolkit
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Install-Package], InvalidOperationException
    + FullyQualifiedErrorId : NuGetMissingPackages,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Can anyone help me get this sample up and running? Thanks!

Tags (1)
0 Kudos
2 Replies
by Anonymous User
Not applicable

Hello Tim, another way to reinstall an unapplied NuGet package in one of the samples within Visual Studio is to go to Tools > NuGet Package Manager > "Manage NuGet Packages for Solution..." 

Then, select the NuGet package and uninstall from the project.  Afterwards, under "Browse" in the package manager UI, find the NuGet again and reinstall for the project:  

Then confirm and finally, just rebuild your solution. That normally will do the trick.

0 Kudos
Occasional Contributor II

When I click Uninstall, I get an error, and it seems like the uninstall failed because the Uninstall button is still enabled.  The error says "while trying to restore package" but that message didn't appear until I clicked Uninstall.

Screenshot of failure to uninstall NuGet package

0 Kudos