Visual Studio Nuget Error Install-Package : The current environment doesn’t have a solution open.

I was attempting to open a solution that I downloaded from Github and I received this error.

Install-Package : The current environment doesn’t have a solution open.

For those of us who met this error, You just have to go to File select Save All in Visual Studio to save the solution somewhere and the problem will be gone.