So I'm developing a game engine framework for myself in C#/.NET and I have been trying to simplify building shader files (the rendering engine consumes SPIR-V files, which I want to generate from GLSL source). My current approach has been to use a custom .targets file which is imported into a CSPROJ, and that file defines a custom target like this:
<Target
Name="Vert"
AfterTargets="Build">
<MakeDir Directories="$(OutputPath)%(VertShader.RelativeDir)"/>
<Exec Command='"$(ENGINE_ROOT)\tools\glslang\windows-x64\glslangValidator.exe" -V %(VertShader.Identity) %(VertShader.OptLevel) -o $(OutputPath)%(VertShader.Identity).spv'></Exec>
</Target>
The general idea behind this is it takes VertShader items, runs the .vert file through glslang, and spits the output .vert.spv file into the build output directory. This works great, almost.
The problem is, if I have Project A that has a bunch of shaders, and then Project B which has a reference to Project A, I want to copy the .vert.spv shaders that Project A generates into the build output directory of Project B, but I haven't had much luck wrangling the target syntax to do what I want.
Is there any way I can get this working the way I'm describing?