0

Visual studio doesn't want to resolve a system variable. In Computer>Properties>Advanced>Environment Variables variable VULKAN_SDK is set to C:\VulkanSDK\1.2.131.2.

However, if I go to Project>Properties>C/C++ setting Additional Include Directories is set to %VULKAN_SDK%\Include;(...). If I open this field for editing, I can see that the line resolves to %VULKAN_SDK%\Include instead of C:\VulkanSDK\1.2.131.2\Include.

It worked until I installed a new version of VulkanSDK.

Note that I closed all VS instances, uninstalled two previous SDKs I had installed (the variable resolved to the latest until then), restarted the PC, installed the new SDK, restarted the PC again and then started VS.

System variable appeared as soon as I installed the new SDK, so that last restart was probably pointless.

Is there any way to force Visual Studio to reevaluate system variables? I was hopping it was something it did automatically, but I don't know anymore.

Any ideas?

Karlovsky120
  • 6,212
  • 8
  • 41
  • 94
  • It is "it worked until" that is the real mystery, it shouldn't have. Hard to come up with a workable theory, just do it the right way. %VULKAN_SDK% is expanded by the command processor, useful only in a build event. In VS you need to use `$(VULKAN_SDK)` – Hans Passant Feb 11 '20 at 15:53
  • That fixed it, thanks. Write it as a full answer so I can close the question properly, if you wish. – Karlovsky120 Feb 11 '20 at 19:15

0 Answers0