microsoft / OpenXR-MixedReality

OpenXR samples and preview headers for HoloLens and Windows Mixed Reality developers familiar with Visual Studio
https://aka.ms/openxr
MIT License
336 stars 96 forks source link

Failed writing shader header files #55

Closed jworch closed 4 years ago

jworch commented 4 years ago

Hi, when trying to compile the samples, I get an error related to the shaders:

1>------ Build started: Project: pbr_uwp, Configuration: Debug ARM64 ------ 1>failed writing F:\work\OpenXR-MixedReality\obj\Debug\ARM64\pbr_uwp\CompiledShaders\PbrPixelShader.h 1>failed writing F:\work\OpenXR-MixedReality\obj\Debug\ARM64\pbr_uwp\CompiledShaders\PbrVertexShader.h 1>failed writing F:\work\OpenXR-MixedReality\obj\Debug\ARM64\pbr_uwp\CompiledShaders\HighlightPixelShader.h 1>PbrResources.cpp 1>F:\work\OpenXR-MixedReality\shared\pbr\PbrResources.cpp(9,10): fatal error C1083: Cannot open include file: 'PbrPixelShader.h': No such file or directory 1>C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\XamlCompiler\Microsoft.Windows.UI.Xaml.Common.targets(482,5): error MSB4181: The "CompileXaml" task returned false but did not log an error. 1>Done building project "pbr_uwp.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any idea what's wrong? The BasicXrApp compiles and runs on Hololens 2 without any problem. Which additional information do you need to help?

brycehutchings commented 4 years ago

I think this might be related to a recent Visual Studio update causing the shader compiler to no longer create any missing directories as needed. Until we get an update out to work around this, you can create the folder "F:\work\OpenXR-MixedReality\obj\Debug\ARM64\pbr_uwp\CompiledShaders" to work around it.

jworch commented 4 years ago

Yes, you were right. Thanks a lot!

yl-msft commented 4 years ago

@jworch FYI, Bryce made a fix for this issue and I merged the fix into latest master day. If you sync to latest, you shouldn't see above errors even without the workaround above. Please let us know if you still hit any issue.

jworch commented 4 years ago

@yl-msft Verified: The fix works for me. Just tried it. Thx a lot.