Failed building BabylonNative for Hololens2/UWP

I sat down to finally have a go at setting up BabylonNative for Hololens2. It seems there is something I either did wrong, or don’t have installed.

I’ve installed git, cmake, VS 2019 w/ UWP and C++, and python3, as directed.

I get through to running cmake, but it immediately fails with this output; any guidance appreciated.

C:\Users\blair_d41\Documents\GitHub\babylonnative\Build>cmake -D CMAKE_SYSTEM_NAME=WindowsStore -D CMAKE_SYSTEM_VERSION=10.0 -A arm64 ..
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.
CMake Error at CMakeLists.txt:5 (project):
  Failed to run MSBuild command:

    C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/MSBuild.exe

  to get the value of VCTargetsPath:

    Microsoft (R) Build Engine version 16.7.0+b89cb5fde for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.

    Build started 10/21/2020 9:53:21 PM.
    Project "C:\Users\blair_d41\Documents\GitHub\babylonnative\Build\CMakeFiles\3.18.4\VCTargetsPath.vcxproj" on node 1 (default targets).
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(777,5): error : The OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='arm64'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\blair_d41\Documents\GitHub\babylonnative\Build\CMakeFiles\3.18.4\VCTargetsPath.vcxproj]
    Done Building Project "C:\Users\blair_d41\Documents\GitHub\babylonnative\Build\CMakeFiles\3.18.4\VCTargetsPath.vcxproj" (default targets) -- FAILED.

    Build FAILED.

    "C:\Users\blair_d41\Documents\GitHub\babylonnative\Build\CMakeFiles\3.18.4\VCTargetsPath.vcxproj" (default target) (1) ->
    (_CheckForInvalidConfigurationAndPlatform target) ->
      C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(777,5): error : The OutputPath property is not set for project 'VCTargetsPath.vcxproj'.  Please check to make sure that you have specified a valid combination of Configuration and Platform for this project.  Configuration='Debug'  Platform='arm64'.  You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\blair_d41\Documents\GitHub\babylonnative\Build\CMakeFiles\3.18.4\VCTargetsPath.vcxproj]

        0 Warning(s)
        1 Error(s)

    Time Elapsed 00:00:00.11


  Exit code: 1

ping @syntheticmagus

Hi blairmacintyre,

Did you install your Visual Studio to an unusual location, perhaps a different drive? It seems like it can’t find MSBuild, so it’s probably worth checking the paths to make sure it’s looking in the correct place.

Other things that come to mind include installing Visual Studio’s CMake tools (though I think they come standard now) and the possibility that, if CMake was installed before Visual Studio, it might be looking in a default location instead of in a place where it found Visual Studio before, in which case uninstalling and reinstalling CMake might help. Hopefully that won’t be necessary, though.

1 Like

I installed CMake last. Installed Visual Studio using defaults and required packages, then python, then git, then cmake.

Note: I didn’t install Visual Studio cmake, I installed cmake from the page linked on the README.

It looks like cmake doesn’t find the compiler.
Do you have a directory like this :
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64
it should contain compilers for various ABI:

image

1 Like

I only have x64 and x86, no arm and arm64 … hmmm. Wonder which checkbox I missed.

from MSVC, menu Tools->Get Tools and Features, and then check:

also check arm64

3 Likes

I had just done it at the same time … I think I got there slightly differently (expanded the defaults for UWP and checked C++ there, I think that is what fixed it). Those ones you highlight above are now installed.

And this works. So, essentially, I didn’t quite install VC correctly; don’t know if there needs to be a bit more clarity in directions or I need a bit more clarity in reading. :wink:

Thanks @Cedric @syntheticmagus

2 Likes

I was just looking for this (VS installer won’t let me see the options until I update). It would be good to update the README to mention this.

1 Like

And now my damn Hololens2 doesn’t show up in the Hololens app, even though it did a few days ago. Removing and readding, no help. Because OF COURSE. sigh. Ok, enough for today, will return to this later.

@blairmacintyre this is one of those days I now feel less alone to have :slight_smile:

1 Like

So, can’t get wifi to work, but I plugged it in over USB and set remote to 127.0.0.1 and BOOM!

A little cube (that I can’t reach in my tiny office) and “sphere hand joints” !! Good job, y’all! Now to dig in…

edit: oh god, now I have to learn Windows … :scream: … but, I am assuming I can just toss whatever in experience.js, and use it as a starting point, and then add in other scripts as I need them and load them

3 Likes