[feature] Expose `vs_ide_version()` in conan.tools.microsoft
See original GitHub issue- I’ve read the CONTRIBUTING guide.
vs_ide_version
in visual.py
is useful for recipes aiming to support both legacy compiler=Visual Studio
and new compiler=msvc
during conan v2 transition.
I’ve started to use it in few conan-center recipes with from conan.tools.microsoft.visual import vs_ide_version
, but it would make sense to import this function the same way than is_msvc
, is_msvc_static_runtime
etc
In grpc
recipe for example we could write something like this:
def validate(self):
if is_msvc(self) and tools.Version(vs_ide_version(self)) < "14":
raise ConanInvalidConfiguration("gRPC can only be built with Visual Studio 2015 or higher.")
Issue Analytics
- State:
- Created a year ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
conan.tools.microsoft — conan 1.43.4 documentation
The MSBuildDeps is the dependency information generator for Microsoft MSBuild build system. It will generate multiple xxxx.props properties files one per ...
Read more >conan Changelog - pyup.io
Fix: When using the new layout() feature of Conan 2.0, change the default ... Feature: New `conan.tool.microsoft.unix_path` to convert paths to any ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Actually,
check_min_vs
is too specific, it doesn’t help when we want to test versions without raising.vs_ide_version
is more versatile.How to translate something like this?
Currently:
I would prefer
Even when we want to raise,
check_min_vs
is not used in conan-center because usually we have more generic logic to handle all compilers min compatible version in a dictionary.thanks