11

I created a new Dev Express Winforms project using the XAF Wizard. Normally this works fine, however I have been playing with installing Dev Express from Nuget recently.

Following this excellent blog from Manuel Grundner

All the references in the new project create correctly except for Entity Framework.

When I try to run Tools->NuGet Package Manager->Manage NugetPackages for Solution

I get an error

Operation failed No projects supported by NuGet in the solution

General

sources

I thought I might try update-package from the Package Manager Console however the Default project combo is empty.

Kirsten
  • 15,730
  • 41
  • 179
  • 318
  • 8
    This error seems to go away after I close and reopen `VS2017` before selecting `Manage NuGet Packeges for Solution` again. refer – Ashish Kamble Oct 29 '18 at 10:41

3 Answers3

27

https://github.com/NuGet/Home/issues/7216

Restarting after selecting "Manage Nuget Package for Solution" (Tools > Nuget Package Manager > Manage Nuget Package for Solution OR right-click context menu on the Solution in Solution Explorer > Manage Nuget Package for Solution), seems to clear this up.

kltft
  • 3,173
  • 2
  • 14
  • 18
  • 7
    This seemed to work for me as well. I simply closed VS2017 and reopened the project and the NuGet Package Manager worked. Right click didn't work for me. – Nathan Aug 05 '19 at 15:44
1

I needed to:

1) restart VS (or reload the project in question), open 'Manage Packages for Solution', change the package source, it seems to be the action of changing the source that is important. I was already set to 'All' but changed it to 'Nuget' and then back to 'All'. Without doing this I could not execute the next step.

2) Installed a package using the 'Manage Packages for Solution' UI. This was an important step without which the next step was not possible.

3) Able to install packages via the package manager console again.

For others searching this and similar issues it started for no reason I can see (was working and the stopped working) with this error:

install-package : The operation failed as details for project ClassLibrary1 could not be loaded.
At line:1 char:1
+ install-package autofac
+ ~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

Even in a newly created project the same result. After this error I would get the Operation failed No projects supported by NuGet in the solution error reported above.

Unloading project & reloading had no effect (https://github.com/NuGet/Home/issues/7216)

It was nothing to do with characters in the project path as reported here (https://developercommunity.visualstudio.com/content/problem/160750/nuget-bug-in-vs155.html)

After changing the package source things seem to be normal, but this is not a global solution.

I need to do this with every new project I create in new solutions or existing. Class libraries and console applications are affected but it seems the new projects created with the new Worker Service template are not affected.

robs
  • 840
  • 10
  • 15
-1

I needed to change the Package source In VS2017

Tools->Package Manager->Manage Packages for Solution

Change Package source to Allas shown

Kirsten
  • 15,730
  • 41
  • 179
  • 318