I created a Xamarin Multiplatform Library using Visual Studio for Mac.
Then I just built the MyProject.NuGet project without any change and it fails.
When looking into the error, it shows,
Cannot create a package that has no dependencies nor content.
and also there were these warnings,
warning : The referenced project 'MyProject.Android' does not exist.
warning : The referenced project 'MyProject.iOS' does not exist.
but the MyProject.Android and MyProject.iOS are existing in the solution and they are having reference links in the MyProject.NuGet project too.