I am trying to download packages using dotnet CLI but I am getting an error :
Couldn't find any project in c:...etc

I am trying to download packages using dotnet CLI but I am getting an error :
Couldn't find any project in c:...etc

I think that you are in your solution folder and there is no .csproj files inside that folder - you need to cd in one more folder which contains desired .csproj file for which you want to install nugget package. Not sure that with dotnet CLI you can install package for entire solution.
I found the solution I had to access :
add webApplication4 add package Newtonsoft.Json
add nameOfTheProject add package nameOfthePackage.