I find that if we change the default windows kits installation path,the function can't work correctly.
I think we can search from system environment variables.
Or we can let the user manually set a fxcpath string.
|
private static string FindFxcExe() |
|
{ |
|
const string WindowsKitsFolder = @"C:\Program Files (x86)\Windows Kits"; |
|
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) && Directory.Exists(WindowsKitsFolder)) |
|
{ |
|
IEnumerable<string> paths = Directory.EnumerateFiles( |
|
WindowsKitsFolder, |
|
"fxc.exe", |
|
SearchOption.AllDirectories); |
|
string path = paths.FirstOrDefault(s => !s.Contains("arm")); |
|
return path; |
|
} |
|
|
|
return null; |
|
} |
I find that if we change the default windows kits installation path,the function can't work correctly.
I think we can search from system environment variables.
Or we can let the user manually set a fxcpath string.
ShaderGen/src/ShaderGen.App/Program.cs
Lines 585 to 599 in badb819