Closed arlm closed 6 years ago
Right now it cannot use the .NET SDK msbuild scripts:
$ ./build.ps1 -Restore
Restoring NuGet packages...
Build started 3/15/2017 9:58:41 PM.
Project "/Volumes/data/git/pinvoke/src/Windows.Core/Windows.Core.csproj" on node 1
(restore target(s)).
/Volumes/data/git/pinvoke/src/Windows.Core/Windows.Core.csproj : error MSB4019:
The imported project "/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/msbuild/15.0
/bin/Sdks/Microsoft.NET.Sdk/Sdk/Sdk.props" was not found. Confirm that the path in the <Import>
declaration is correct, and that the file exists on disk.
Done Building Project "/Volumes/data/git/pinvoke/src/Windows.Core/Windows.Core.csproj"
(restore target(s)) -- FAILED.
Build FAILED.
I guess that I adding reference to the NuGet Microsoft.NET.Sdk package would solve the problem, but when I tried to add it on Windows.Core.csproj
:
<ItemGroup>
<PackageReference Include="Microsoft.NET.Sdk" Version="1.0.0-alpha-20161104-2" />
</ItemGroup>
I started getting this error on nuget restore:
nuget restore Windows.Core/Windows.Core.csproj -Verbosity detailed
NuGet Version: 3.5.0.1996
Nothing to do. This project does not specify any packages for NuGet to restore.
For the PackageReference
tag to work, instead of using package.json
, one must use NuGet 4.0 and also wait for the resolution of this bug: NuGet/Home#4532 (got to it through NuGet/Home#4804)
Also Visual Studio for macOS Preview 4 (7.0 build 1566) running on Mono 4.8.0 (mono-4.8.0-branch/e4a3cf3) (64-bit) and Mac OS X 10.12.2 hits null objects when trying to restore the NuGet packages from the project. I opened a bug through the Help > Report a Problem
menu stating that and explaining how to reproduce and citing this repository. Let's see how efficient Microsoft macOS Visual Studio team can be, I have no idea on what to expect from this bug.
---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object
at MonoDevelop.PackageManagement.PackageSpecCreator.GetProjectRestoreReference (MonoDevelop.Projects.ProjectReference item, MonoDevelop.PackageManagement.IDotNetProject project) [0x0001f] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageSpecCreator.cs:165
at MonoDevelop.PackageManagement.PackageSpecCreator+<AddProjectReferences>c__AnonStorey0.<>m__0 (MonoDevelop.Projects.ProjectReference projectReference) [0x00000] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageSpecCreator.cs:126
at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00064] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/System.Core/System/Linq/Enumerable.cs:285
at MonoDevelop.PackageManagement.PackageSpecCreator.AddProjectReferences (NuGet.ProjectModel.PackageSpec spec, MonoDevelop.PackageManagement.IDotNetProject project) [0x00151] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageSpecCreator.cs:142
at MonoDevelop.PackageManagement.PackageSpecCreator.CreatePackageSpec (MonoDevelop.PackageManagement.IDotNetProject project) [0x00042] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageSpecCreator.cs:50
at MonoDevelop.PackageManagement.PackageSpecCreator.CreatePackageSpec (MonoDevelop.Projects.DotNetProject project) [0x00000] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/PackageSpecCreator.cs:39
at MonoDevelop.PackageManagement.DotNetCoreNuGetProject.CreateProjectPackageSpec (MonoDevelop.Projects.DotNetProject project) [0x00000] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/DotNetCoreNuGetProject.cs:234
at MonoDevelop.PackageManagement.DotNetCoreNuGetProject.<CreateProjectPackageSpec>m__3 () [0x00000] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/DotNetCoreNuGetProject.cs:228
at MonoDevelop.Core.Runtime+<RunInMainThread>c__AnonStorey1`1[T].<>m__0 (System.Object ) [0x00000] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Runtime.cs:356
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at MonoDevelop.PackageManagement.DotNetCoreNuGetProject+<CreateProjectPackageSpec>c__async3.MoveNext () [0x00021] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/DotNetCoreNuGetProject.cs:228
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at MonoDevelop.PackageManagement.DotNetCoreNuGetProject+<GetPackageSpecsAsync>c__async2.MoveNext () [0x00058] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/DotNetCoreNuGetProject.cs:206
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at NuGet.PackageManagement.DependencyGraphRestoreUtility+<GetSolutionRestoreSpec>d__8.MoveNext () [0x0013e] in <672446b5ceaf4ce691b6de54637346a4>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at NuGet.PackageManagement.DependencyGraphRestoreUtility+<PreviewRestoreAsync>d__4.MoveNext () [0x00084] in <672446b5ceaf4ce691b6de54637346a4>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at NuGet.PackageManagement.DependencyGraphRestoreUtility+<RestoreProjectAsync>d__5.MoveNext () [0x0013c] in <672446b5ceaf4ce691b6de54637346a4>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at MonoDevelop.PackageManagement.MonoDevelopBuildIntegratedRestorer+<RestorePackagesInternal>c__async2.MoveNext () [0x00064] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopBuildIntegratedRestorer.cs:135
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:357
at MonoDevelop.PackageManagement.MonoDevelopBuildIntegratedRestorer+<RestorePackages>c__async0.MoveNext () [0x000b8] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/MonoDevelopBuildIntegratedRestorer.cs:88
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00047] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:187
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x0002e] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:156
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x0000b] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:128
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in /private/tmp/source-mono-4.8.0/bockbuild-mono-4.8.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/TaskAwaiter.cs:113
at MonoDevelop.PackageManagement.RestoreNuGetPackagesAction+<ExecuteAsync>c__async0.MoveNext () [0x00116] in /Users/builder/data/lanes/4533/2f11ef3c/source/monodevelop/main/src/addins/MonoDevelop.PackageManagement/MonoDevelop.PackageManagement/RestoreNuGetPackagesAction.cs:131 <---
For the PackageReference tag to work, instead of using package.json, one must use NuGet 4.0
package.json
is an NPM package file. Did you mean project.json
which we don't use any more?
I take it you don't mean for this PR to be completed yet, as it's a work in progress. Is that right?
Also, have you tried using the dotnet CLI? It won't find all the packages (for net20 for example), but if you use the -f
switch you may be able to build the netstandard1.1 profile.
Yes, I meant project.json
. I know we don't use anymore, but unfortunately NuGet still requires the old formats. I don't know on Windows, but NuGet 4.0 is not ready for macOS yet.
I intended to get out and working on VS for macOS, but it seems there are things to wait on other projects in order to be able to compile on this platform.
I'll try the dotnet CLI tomorrow.
I take it you don't mean for this PR to be completed yet, as it's a work in progress. Is that right?
Yes, let's use it to track the necessary changes to have it compiling on non-Windows platforms.
As far as the goal of building on non-Windows, I can see two benefits here:
What I don't see ever happening is us shipping what we build on non-Windows because I don't think non-Windows platforms will ever support building the full package including net20 (unless mono eventually supports that).
BTW, I don't know that any version of nuget.exe will work with the new PackageReference items, if that's what you're hoping for. The new references are fairly deeply built into msbuild now. And xbuild isn't seeing much investment from what I gather. So I think your best bet is Msbuild Core (which works for this) via the dotnet CLI.
As far as I know xbuild is not used anymore. Mono 4.x+ uses msbuild and has been running swiftly. About the NuGet, I understood from NuGet/Home#4532 that the 4.0 version has this support or may have it...
Well, @mward, from Microsoft, took time to review my report and stated two things:
After @mward patch now I could restore the NuGet packages on Visual Studio and he stated that the null pointer error fix will be deployed on the next version!
Right now, Visual Studio for Mac, when using this branch, simply closes when our solution is loaded. I'll see how can I file another report and reproduce it do go further on this journey. Using MSBuild, PowerShell and .NET Core on macOS still throws for me the .NET SDK not found error. I'll try to identify if the problem is on MSBuild or .NET Core to file a bug report.
Closing due to inactivity.
NOTE: Must have mono, .NET Core and PowerShell properly installed on the machine
This is to start the effort and discussions on how to make it work on Visual Studio for MacOS and Linux command-line.