visual-studiomacrospost-build-eventbuild-events

Visual Studio 2019 Windows SDK executable path macro has multiple paths


I'm trying to use $(WindowsSDK_ExecutablePath_x64) in my C++ project post build events to copy some files. However, it contains two paths instead of one. I can't seem to be able to find how to use the first path (not the .Net one):

C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64

I'd like to do something like copy /Y $(WindowsSDK_ExecutablePath_x64)\bin\file.ext destination in my post build events. How can I do this? I'm using VS 2019 and have the latest Windows SDK installed.


Solution

  • I ended up using the following:

    $(WindowsSdkDir)bin\$(TargetPlatformVersion)\x64\dxil.dll