Skip to content

Instantly share code, notes, and snippets.

@ifarbod
Created April 16, 2022 20:34
Show Gist options
  • Save ifarbod/ded00edab66a1d3f2ee1c91e8db0a052 to your computer and use it in GitHub Desktop.
Save ifarbod/ded00edab66a1d3f2ee1c91e8db0a052 to your computer and use it in GitHub Desktop.
Change needed for NDK r23 to work on VS 2022

Path: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\Application Type\Android\3.0

22c22
<     <ToolchainPrebuiltRoot_x64_Present Condition="'$(ToolchainPrebuiltRoot_x64_Present)' == '' and '$(HostTag)' == '' and Exists('$(VS_NdkRoot)\toolchains\$(LLVMName)\prebuilt\windows-x86_64') and Exists('$(VS_NdkRoot)\toolchains\$(ToolchainName)-$(ToolchainVersion)\prebuilt\windows-x86_64')">true</ToolchainPrebuiltRoot_x64_Present>
---
>     <ToolchainPrebuiltRoot_x64_Present Condition="'$(ToolchainPrebuiltRoot_x64_Present)' == '' and '$(HostTag)' == '' and Exists('$(VS_NdkRoot)\toolchains\$(LLVMName)\prebuilt\windows-x86_64')">true</ToolchainPrebuiltRoot_x64_Present>

The reason for this is that the second condition is not met, thus not setting ToolchainPrebuiltRoot_x64_Present to true, making HostTag return windows. R22 works fine however as that directory still exists in that toolchains folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment