You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vcpkg package ms-gsl 4.2.0 contains incorrect version number in its CMake version file #1224
Describe the bug
I have installed Microsoft GSL 4.2 using vcpkg on Windows. The CMake version file that was installed however reports the version to be 4.1.0, so that if I explicitly request version 4.2.0 with find_package the library will not be found.
To Reproduce
This is how I installed Microsoft GSL, note how it says 4.2.0:
C:\tools\vcpkg>vcpkg install ms-gsl
Computing installation plan...
The following packages will be built and installed:
ms-gsl:x64-windows@4.2.0
< ... more vcpkg output ... >
Beginning of the CMake version file at C:/tools/vcpkg/installed/x64-windows/share/Microsoft.GSL/Microsoft.GSLConfig.cmake, note how it says 4.1.0 at the bottom of the excerpt:
# This is a basic version file for the Config-mode of find_package().
# It is used by write_basic_package_version_file() as input file for configure_file()
# to create a version-file which can be installed along a config.cmake file.
#
# The created file sets PACKAGE_VERSION_EXACT if the current version string and
# the requested version string are exactly the same and it sets
# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version,
# but only if the requested major version is the same as the current one.
# The variable CVF_VERSION must be set before calling configure_file().
set(PACKAGE_VERSION "4.1.0")
< ... more CMake code ... >
CMake output when I run find_package(Microsoft.GSL 4.2.0 CONFIG REQUIRED):
4> CMake Error at C:/tools/vcpkg/scripts/buildsystems/vcpkg.cmake:908 (_find_package):
4> Could not find a configuration file for package "Microsoft.GSL" that is
4> compatible with requested version "4.2.0".
4>
4> The following configuration files were considered but not accepted:
4>
4> C:/tools/vcpkg/installed/x64-windows/share/Microsoft.GSL/Microsoft.GSLConfig.cmake, version: 4.1.0
4> The version found is not compatible with the version requested.
Note that if I explicitly request version 4.1.0 the library is found as one would expect in that case.
Expected behaviour
If I install version 4.2.0, find_package should be able to find version 4.2.0
Thank you for reporting this issue! It looks like this was fixed in #1202, but we never re-tagged. I'll create a new v4.2.0 tag and update the vcpkg port.
Slight change of plans - instead of re-tagging, I have created a new v4.2.1 release. It is live from our end but will take a little while for vcpkg to consume it. I will close this issue when v4.2.1 is available from vcpkg.
Activity
carsonRadtke commentedon Nov 26, 2025
Thank you for reporting this issue! It looks like this was fixed in #1202, but we never re-tagged. I'll create a new v4.2.0 tag and update the vcpkg port.
carsonRadtke commentedon Dec 8, 2025
Slight change of plans - instead of re-tagging, I have created a new v4.2.1 release. It is live from our end but will take a little while for vcpkg to consume it. I will close this issue when v4.2.1 is available from vcpkg.
Update ms-gsl to version 4.2.1 / rev 5 via SR 1323011
carsonRadtke commentedon Jan 5, 2026
ms-gsl 4.2.1 is live on vcpkg: microsoft/vcpkg#48756