microsoft / MixedReality-HolographicRemoting-Samples

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

Unable to compile Holographic Player App #103

Closed DeadlyMagikarps closed 1 month ago

DeadlyMagikarps commented 2 months ago

I've been unable to compile the Holographic Remoting player app following the readme that is provided. (The pre-packaged one works, but there are use cases that we would like so the custom route makes the most sense.) However, I can't compile it as is.

I've installed all the required components for an ARM64 build for the Hololens 2. I'm compiling as is without modification right now. Nuget Packages was restored.

The error isn't helpful either:

Severity    Code    Description Project File    Line    Suppression State   Details
Error   MSB6006 "fxc.exe" exited with code 1.   SamplePlayer    C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets   1847        

I'm unsure if it's dependent on something else in the repository as I moved the "player" folder somewhere else and opened the solution SamplePlayer from there. Seems like it is related to the shaders and I'm unsure what settings is needed in visual studio.

Using the latest Visual Studio 2022 version: 17.10.3 OS: Windows 10 Enterprise Version 10.0.19045 Build 19045

Any guidance would be appreciated.

chairobl commented 1 month ago

Hi @DeadlyMagikarps , fxc.exe is DirectX's HLSL shader compiler. Based on you having copied the "player" folder I'm guessing that you didn't copy the "common" folder with it. It contains shaders and other files used by both the player and remote projects. When fxc.exe is ran as part of the build it fails to find the shader files and exits with error code 1.

DeadlyMagikarps commented 1 month ago

@chairobl I do have the common folder copied. But I'm unsure if it should be automatically linking or is there a setting where I have to explicitly tell it to use the common folder. I have not changed the folder structure otherwise.

DeadlyMagikarps commented 1 month ago

@chairobl

For more clarity,

The common folder is in the same spot as in the examples for this repo.

I checked the HLSL Compiler Settings under Configuration Properties and tried several options.

Such as looking at the Additional Include Directories. Which shows the common/Content and sample/shaders

Changed Shader Tyler to Pixel Shader, Shader Model, I've tried a few including 5.1.

But the versions doesn't seem to be effecting the compilation and still get the fxc.exe error.

I must be something stupid simple and I'm just not seeing it.

Unless you're talking about both the commons folder in the root and inside player?

DeadlyMagikarps commented 1 month ago

@chairobl I'll be damned.

That's what I was missing. The top level shaders folder.

Thanks for mentioning that! It compiles and launched on the headset.

Marking it closed.

For future reference to others for just the player app compilation:

common player