From c275684b9c79dfa6a2c72f910e511cb8e7dbc560 Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 8 Aug 2024 07:36:11 +0200 Subject: [PATCH 1/2] fix setting msvc compiler in profiles --- ConanProfilesManager.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ConanProfilesManager.cs b/ConanProfilesManager.cs index fddb8ea..e3f5b7d 100644 --- a/ConanProfilesManager.cs +++ b/ConanProfilesManager.cs @@ -31,8 +31,17 @@ private string getConanArch(string platform) return archMap[platform]; } - private string getConanCompilerVersion(string platformToolset) + private string getConanCompilerVersion(string platformToolset, string vsVersion) { + if (Version.TryParse(vsVersion, out Version parsedVersion)) + { + // https://github.com/conan-io/conan/issues/16239 + if (parsedVersion.Major == 17 && parsedVersion.Minor >= 10) + { + return "194"; + } + } + var msvcVersionMap = new Dictionary(); msvcVersionMap["v143"] = "193"; msvcVersionMap["v142"] = "192"; @@ -106,7 +115,8 @@ public void GenerateProfilesForProject(Project project) string profilePath = System.IO.Path.Combine(conanProjectDirectory, profileName); string toolset = vcConfig.Evaluate("$(PlatformToolset)").ToString(); - string compilerVersion = getConanCompilerVersion(toolset); + string vsVersion = vcConfig.Evaluate("$(MSBuildVersion)").ToString(); + string compilerVersion = getConanCompilerVersion(toolset, vsVersion); string arch = getConanArch(vcConfig.Evaluate("$(PlatformName)").ToString()); IVCRulePropertyStorage generalRule = vcConfig.Rules.Item("ConfigurationGeneral") as IVCRulePropertyStorage; string languageStandard = generalRule == null ? null : generalRule.GetEvaluatedPropertyValue("LanguageStandard"); From 6fcc3f430829256190056b9400cd9909776907af Mon Sep 17 00:00:00 2001 From: czoido Date: Thu, 8 Aug 2024 07:45:02 +0200 Subject: [PATCH 2/2] version 2.0.7 --- source.extension.vsixmanifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source.extension.vsixmanifest b/source.extension.vsixmanifest index 63e5d3a..e027d00 100644 --- a/source.extension.vsixmanifest +++ b/source.extension.vsixmanifest @@ -1,7 +1,7 @@  - + Conan Extension for Visual Studio Conan Extension for Visual Studio automates the use of the Conan C/C++ package manager for retrieving dependencies within Visual Studio projects. https://github.com/conan-io/conan-vs-extension