I have an ASP.NET Core project that builds properly with Visual Studio, but it doesn\'t build under MSBuild.
It doesn\'t find all the common libraries (system, etc.)
nuget restore will ensure all of your NuGet dependencies are downloaded and available to your project. Whereas dotnet restore is a complete restoration of all NuGet dependencies as well as references and project specific tools. Meaning that if you run nuget restore, you are only restoring NuGet packages.
According to docs.microsoft.com: Dotnet Restore
The
dotnet restorecommand uses NuGet to restore dependencies as well as project-specific tools that are specified in the project file...