Using VS2015 when VS2017 is available #19076
Replies: 7 comments
-
We don't currently have an easy, supported way to opt out of VS2017. We'd like to do better in the future, but for now the closest options are: 1. Set the
This will work for CMake-based ports that don't use Ninja and possibly others. Notably, this will not change 2. In your "VS2015" vcpkg enlistment, modify In the future, we would like to make option 1 above the official, supported way (and make it work for all portfiles). |
Beta Was this translation helpful? Give feedback.
-
Hi, is this still the case? I don't see any flexibility in picking a toolset during the bootstrap process. v140 is only searched if v141 isn't found in Thanks! |
Beta Was this translation helpful? Give feedback.
-
We don't currently have a way to opt-out from using v141 during the bootstrap process, since it doesn't affect any of the produced libraries and we want the tool to be as fast as possible with the latest toolset 😄. Could you detail a bit more about the issues you're having with using VS2017 while boostrapping |
Beta Was this translation helpful? Give feedback.
-
Ah well then perhaps I have some other issue. I was basically setting VCPKG_PLATFORM_TOOLSET to v140 in my triplet file and getting an immediate build error with zlib. The build was still trying to be performed with VS2017 (and works if I don't specify the VCPKG_PLATFORM_TOOLSET). Forcing the bootstrap to find VS2015 instead of VS2017 fixed the error; perhaps I needed to do some more investigation if the bootstrap shouldn't impact the build process. |
Beta Was this translation helpful? Give feedback.
-
Small note: given that backward compatibility of libraries generated with v141 with executable compiled with v140 is not guaranteed (see https://docs.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=vs-2017) this feature may be important to anyone that wants to build and distribute libraries that could be consumable by both VS2015 and VS2017. |
Beta Was this translation helpful? Give feedback.
-
About setting
|
Beta Was this translation helpful? Give feedback.
-
You can also set VCPKG_VISUAL_STUDIO_PATH in triplet. |
Beta Was this translation helpful? Give feedback.
-
I have both VS2015 and VS2017 installed and would like to have one vcpkg environment for each toolset. Is there a way to get vcpkg to use the older one? I have tried running it in a VS2015 developer command prompt; it still uses the newer compilers.
Beta Was this translation helpful? Give feedback.
All reactions