Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About findFXC #105

Open
ghost opened this issue Jan 19, 2021 · 0 comments
Open

About findFXC #105

ghost opened this issue Jan 19, 2021 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 19, 2021

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants