microsoft / MixedReality-HolographicRemoting-Samples

Code samples for using Microsoft's Holographic Remoting library.
Other
141 stars 47 forks source link

Code for OpenXR will not compile Out of Box in VS 2022 #63

Closed laultman closed 2 years ago

laultman commented 2 years ago

After the Project is retargeted to VS 2022 in the options. (We do not have VS 2019 and are not allowed to install older components in new code dev/builds.)

To Reproduce Obtain latest code from repository and unzip to a folder. Open VS 2022 (latest install) and open the remoteOpenXR solution. Right-click the Project name and choose Properties from the context menu. Under Configuration Properties/General, from the right pane's General Properties/Platform Toolset dropdown select Visual Studio 2022 to retarget the solution. Under Configuration Properties/Debugging in the right pane's property Command Line Arguments enter the IP address of your HoloLens 2 device. Build the app.

This code produces an error:

ifdef _MSC_VER

template <typename X, typename Y>
constexpr const X& cast(const Y& value) {
    static_assert(false, "Undefined cast from Y to type X");
}

endif

If you change the code for VS 2022 you do not get the error because you have effectively removed the cast template. //#ifdef _MSC_VER

if _MSC_VER <= 1929

template <typename X, typename Y>
constexpr const X& cast(const Y& value) {
    static_assert(false, "Undefined cast from Y to type X");
}

endif

In any case this code does not work while the remote WMR version does work.

Screenshots / videos If applicable, add screenshots or videos to help explain your problem.

Remote side (your Windows PC):

Player side (e.g. your HoloLens 2)

lappelsmeier commented 2 years ago

Hi @laultman,

a fix for this is coming in the next days :)

Thanks, Marc

lappelsmeier commented 2 years ago

Hi,

with the latest which just went in the problems are fixed. Let us know if you have any further problems!

Bye, Marc