Here's a solution without explanation, it should apply for UWP apps:
I manually put the shader files in a directory like this
which in my case would be
Then the compiler can read the shader files, it works for either fx. files(hlsl source code) and fxo. files(compiled before the whole solution with another program the fxc.exe).
The second method can use the guidance fromhttp://stackoverflow.com/questions/23293760/creating-fxo-shader-file-using-fxc-exe
There are other complications that one might want to notice
- the visual studio create txt. files with UTF-8 coding, you may want to check out in ASCII coding to remove the chars at the beginning of a file, which may cause problem.
fxc.exe can be found for example in this directory
C:\Program Files (x86)\Windows Kits\10\bin\x64
- You'd better copy the fxc.exe into another folder to run it, the directory of the exe. file and source file would better not contain blanks in any of its folder names in the path.
The idea comes from the example made by HelixToolkit. You see there are lot of bumps in route and since few are doing sharpdx + uwp right now we have to sweep them ourselves. I hope this can help others who face the same problem, and of course I hope there are pros who can explain why this works and otherwise it doesn't.