简体   繁体   中英

fxc.exe not found by VS2017 in windows 10

I'm going to use the HelixToolkit.SharpDX with VS2017 in my Windows 10 workstation, when I attempt to build the solution, it will prompt the Assertion Failed error with "No fxc.exe found".

I have checked the installation option, Windows SDK has been included, nand I have downloaded and install again, and I can see the fxc.exe in "C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.16299.0\\x64" & "C:\\Program Files (x86)\\Windows Kits\\10\\bin\\10.0.16299.0\\x86" folders, so it should be available for any windows version, but unfortunately, the same error reported.

However, I have also installed VS2017 in another Windows 7 machine, it works fine, and it has the fxc.exe in the same folder as my Windows 10 workstation, but it can be located by VS2017.

Is there any setting in VS2017 to locate the fxc.exe? Or how can I fix this issue?

Copy fxc.exe in Bin\\10.0.xxx\\x86 to Bin\\x86 to fix this issue. Because the HLSL compile tool hard coded the path.

One can find solution on helix toolkit github page.

Visual Studio 2017. Windows 10 SDK.

Missing fxc.exe issue with newest Windows 10 SDK:

Copy fxc.exe in C:\\Program Files (x86)\\Windows Kits\\10\\Bin\\10.0.xxx\\x86 to C:\\Program Files (x86)\\Windows Kits\\10\\bin\\x86 to fix this issue. Because the HLSL compile tool hard coded the path.

This seems to have been fixed in Visual Studio 2019 16.0.2, as of writing. Just have to make sure $(WindowsSDK_ExecutablePath) is pointing to the correct SDK directory and the build version that matches with the Targeted Platform in the Project Properties page.

https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/a3032567-d8e7-4b01-81b7-0612047a6299/why-do-we-need-to-copypaste-fxcexe-from-bin100xxxxx0x86-to-binx86-directory-in-the?forum=windowssdk

Second post answered:

The executables that the C++ build process uses from the Windows SDK directory are MIDL.exe, MT.exe and RC.exe. If you digitally sign your executables then you will find signtool.exe here too. So I am kind of surprised that it finds some critical build tools correctly but others it fails to find.

My suggestion would be:

1) Verify that you are having this problem with your project in Visual Studio 2019 16.0.2 (the latest version at the time of writing) or Visual Studio 2019 Preview (16.1 Preview 1 at the time of writing). This is to check that if this has been found to be a bug, then it could have been fixed.

2) Create a completely new project. Without touching the project's executable path, try to create a sample that shows this behaviour. It doesn't need to be a full sample, just complete enough to show that Visual Studio fails to find fxc.exe.

3) If doing all of this shows that Visual Studio fails to find fxc.exe, then through Visual Studio 2019, report it as a bug.

But I will mention that a naïve test on my end shows that Visual Studio 2019 can compile HLSL shaders without any issues using the 18362, 17763 and 17134 SDKs . These were tested because these are the versions that I have installed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM