Cannot build Hololens application VS2019

Hi all,

I am having some issues building the client app, I was wondering if this is a bug or an issue on my end somehow, below is an extract from the output log:

Build started…
1>------ Build started: Project: client_app_hl, Configuration: Debug ARM64 ------
1>cl : command line warning D9025: overriding ‘/std:c++14’ with ‘/std:c++latest’
1>cl : command line warning D9025: overriding ‘/std:c++14’ with ‘/std:c++latest’
1>cl : command line warning D9025: overriding ‘/std:c++14’ with ‘/std:c++latest’
1>C:\dev\01-29-2021-CloudXR-SDK-2.0\Sample\WindowsMR\HoloLens\AppView.h(75,17): error C2259: ‘CloudXRClientApp::AppView’: cannot instantiate abstract class (compiling source file AppView.cpp)
1>C:\dev\01-29-2021-CloudXR-SDK-2.0\Sample\WindowsMR\HoloLens\AppView.h(33): message : see declaration of ‘CloudXRClientApp::AppView’ (compiling source file AppView.cpp)
1>C:\dev\01-29-2021-CloudXR-SDK-2.0\Sample\WindowsMR\HoloLens\AppView.h(75,17): message : due to following members: (compiling source file AppView.cpp)
1>C:\dev\01-29-2021-CloudXR-SDK-2.0\Sample\WindowsMR\HoloLens\AppView.h(75,17): message : ‘void winrt::implementsCloudXRClientApp::AppView,winrt::Windows::ApplicationModel::Core::IFrameworkView::use_make_function_to_create_this_object(void)’: is abstract (compiling source file AppView.cpp)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\cppwinrt\winrt\base.h(6903): message : see declaration of ‘winrt::implementsCloudXRClientApp::AppView,winrt::Windows::ApplicationModel::Core::IFrameworkView::use_make_function_to_create_this_object’ (compiling source file AppView.cpp)
1>C:\dev\01-29-2021-CloudXR-SDK-2.0\Sample\WindowsMR\HoloLens\AppView.cpp(80,26): error C2275: ‘CloudXRClientApp::AppViewSource’: illegal use of this type as an expression
1>C:\dev\01-29-2021-CloudXR-SDK-2.0\Sample\WindowsMR\HoloLens\AppView.h(69): message : see declaration of ‘CloudXRClientApp::AppViewSource’
1>C:\dev\01-29-2021-CloudXR-SDK-2.0\Sample\WindowsMR\common\SpatialInputHandler.cpp(166,42): error C2440: ‘initializing’: cannot convert from ‘T’ to ‘T &’
1> with
1> [
1> T=winrt::Windows::UI::Input::Spatial::SpatialInteractionSourceState
1> ]
1>C:\dev\01-29-2021-CloudXR-SDK-2.0\Sample\WindowsMR\common\SpatialInputHandler.cpp(166,42): message : A non-const reference may only be bound to an lvalue
1>C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(486,5): error MSB4181: The “CompileXaml” task returned false but did not log an error.
1>Done building project “receiver_hl.vcxproj” – FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

I have managed to build it using v141, the errors above were as a result of trying to retarget the project for v142, because VS 2019s installer isn’t exactly the most intutitve I was missing v141 for the longest time, this post on stack overflow helped a lot: windows runtime - Build fails for C++/CX project with v141 platform toolset in Visual Studio 2019 - Stack Overflow

I tried passing the arguments for the server in VS2019 using commandline arguments like it works on the windows/linux example, however, that caused an error for me so following the steps on:

copying the launcher options file helped. Perhaps it was referencing the file in the local state folder and that not being found causes the app to crash, I haven’t digged into the code fully yet to see if it is this.


What error were you seeing when you tried to pass the commandline args in Visual Studio? And what are you seeing when the app crashes?