Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake scan kits for VS2017 found question mark. #1104

Closed
lygstate opened this issue Mar 2, 2020 · 12 comments
Closed

CMake scan kits for VS2017 found question mark. #1104

lygstate opened this issue Mar 2, 2020 · 12 comments
Labels
bug a bug in the product Feature: kits fixed (release pending) fixed in pre-release and is pending official release
Milestone

Comments

@lygstate
Copy link
Contributor

lygstate commented Mar 2, 2020

The found vs 2017 Toolchain have question mark

  {
    "name": "Visual Studio 15 ???? 2017 Release - amd64_arm",
    "visualStudio": "d1c3a502",
    "visualStudioArchitecture": "amd64_arm",
    "preferredGenerator": {
      "name": "Visual Studio 15 2017",
      "platform": "ARM"
    }
  },
  {
    "name": "Visual Studio 15 ???? 2017 Release - amd64_x86",
    "visualStudio": "d1c3a502",
    "visualStudioArchitecture": "amd64_x86",
    "preferredGenerator": {
      "name": "Visual Studio 15 2017"
    }
  },
  {
    "name": "Visual Studio 15 ???? 2017 Release - x86",
    "visualStudio": "d1c3a502",
    "visualStudioArchitecture": "x86",
    "preferredGenerator": {
      "name": "Visual Studio 15 2017"
    }
  },
  {
    "name": "Visual Studio 15 ???? 2017 Release - x86_amd64",
    "visualStudio": "d1c3a502",
    "visualStudioArchitecture": "x86_amd64",
    "preferredGenerator": {
      "name": "Visual Studio 15 2017"
    }
  },

Brief Issue Summary

Expected:

  1. Push button
  2. Thing happens

Apparent Behavior:

  1. Push button
  2. Nothing happens

CMake Tools Log

<!-- Paste the log contents HERE -->

Developer Tools Log

<!-- Paste the log contents HERE -->

Platform and Versions

  • Operating System:
  • CMake Version:
  • VSCode Version:
  • CMake Tools Extension Version:
  • Compiler/Toolchain:

Other Notes/Information

@andreeis andreeis added the more info needed More info is needed from the community for us to properly triage and investigate. label Mar 6, 2020
@andreeis
Copy link
Contributor

andreeis commented Mar 6, 2020

What VS 2017 SKU did you install (maybe you can still remember the link). Where is your VS 2017 installed on your computer? What version does VS have (see windows-about)?

@lygstate
Copy link
Contributor Author

lygstate commented Mar 7, 2020

I didn't install VS 2017, just the vs 2017 compier in visual studio 2019

@andreeis
Copy link
Contributor

andreeis commented Mar 9, 2020

Interesting, I wasn't aware of that possibility. I just tried it and I don't reproduce the "???". In my case it's not detected at all, which of course we can look at this and fix it for 1.4 but I'm still curious how you are able to have them detected, even with the "???" in the name.

What CMake Tools version do you have?

What 2019 SKU, Enterprise or something else?
The original installation of your 2019 SKU contained the 2019 compiler as well?

I tried this, on a computer with only 2019 Enterprise: VS Installer --> Modify --> Individual Components --> Search --> type 2017 --> find several and checked all --> let them install.
I see them on disk but "Scan for kits" in CMake Tools 1.3.1 doesn't find them at all".

@andreeis andreeis added this to the 1.4.0 milestone Mar 9, 2020
@bobbrow
Copy link
Member

bobbrow commented Mar 10, 2020

vswhere.exe is providing the names. Is this a non-English version of Visual Studio?

@lygstate
Copy link
Contributor Author

Which vswhere.exe should execute, I can execute locally.

@lygstate
Copy link
Contributor Author

I am using Chiense version of Visual Studio 2019,

@andreeis
Copy link
Contributor

andreeis commented Mar 26, 2020

Try c:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe.

@bobbrow
Copy link
Member

bobbrow commented Mar 26, 2020

There is also a version that comes with the CMake Tools extension:

"C:\Users\<username>\.vscode\extensions\ms-vscode.cmake-tools-1.3.1\res\vswhere.exe"

@lygstate
Copy link
Contributor Author

Yeap,you are all right, the source of the problem are vswhere
In Console it's

[
  {
    "instanceId": "3c73bd68",
    "installDate": "2019-10-07T09:38:54Z",
    "installationName": "VisualStudio/16.3.6+29418.71",
    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community",
    "installationVersion": "16.3.29418.71",
    "productId": "Microsoft.VisualStudio.Product.Community",
    "productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\devenv.exe",
    "isPrerelease": false,
    "displayName": "Visual Studio Community 2019",
    "description": "功能强大的 IDE,供学生、开放源代码参与者和个人免费使用",
    "channelId": "VisualStudio.16.Release",
    "channelUri": "https://aka.ms/vs/16/release/channel",
    "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
    "installChannelUri": "E:\\Software\\IDE\\vs2019\\offline\\ChannelManifest.json",
    "layoutPath": "E:\\Software\\IDE\\vs2019\\offline",
    "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660893#16.3.6",
    "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909",
    "updateDate": "2019-10-24T09:24:14.8927651Z",
    "catalog": {
      "buildBranch": "d16.3",
      "buildVersion": "16.3.29418.71",
      "id": "VisualStudio/16.3.6+29418.71",
      "localBuild": "build-lab",
      "manifestName": "VisualStudio",
      "manifestType": "installer",
      "productDisplayVersion": "16.3.6",
      "productLine": "Dev16",
      "productLineVersion": "2019",
      "productMilestone": "RTW",
      "productMilestoneIsPreRelease": "False",
      "productName": "Visual Studio",
      "productPatchVersion": "6",
      "productPreReleaseMilestoneSuffix": "1.0",
      "productSemanticVersion": "16.3.6+29418.71",
      "requiredEngineVersion": "2.3.2283.19382"
    },
    "properties": {
      "campaignId": "",
      "channelManifestId": "VisualStudio.16.Release/16.3.6+29418.71",
      "nickname": "",
      "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installershell.exe"
    }
  },
  {
    "instanceId": "d1c3a502",
    "installDate": "2019-11-21T15:04:56Z",
    "installationName": "VisualStudio/15.9.17+28307.905",
    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools",
    "installationVersion": "15.9.28307.905",
    "productId": "Microsoft.VisualStudio.Product.BuildTools",
    "productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\Tools\\LaunchDevCmd.bat",
    "isPrerelease": false,
    "displayName": "Visual Studio 15 生成工具 2017",
    "description": "Visual Studio 生成工具允许生成本机和基于 MSBuild 的托管 .NET 应用程序,而不需要 Visual Studio IDE。 还可以选择安装 Visual C++ 编译器和库、MFC、ALT 和 C++/CLI 支持。",
    "channelId": "VisualStudio.15.Release",
    "channelUri": "https://aka.ms/vs/15/release/channel",
    "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
    "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660692#15.9.17",
    "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660708",
    "updateDate": "2019-11-21T15:04:56.1987724Z",
    "catalog": {
      "buildBranch": "d15.9",
      "buildVersion": "15.9.28307.905",
      "id": "VisualStudio/15.9.17+28307.905",
      "localBuild": "build-lab",
      "manifestName": "VisualStudio",
      "manifestType": "installer",
      "productDisplayVersion": "15.9.17",
      "productLine": "Dev15",
      "productLineVersion": "2017",
      "productMilestone": "RTW",
      "productMilestoneIsPreRelease": "False",
      "productName": "Visual Studio",
      "productPatchVersion": "17",
      "productPreReleaseMilestoneSuffix": "1.0",
      "productRelease": "RTW",
      "productSemanticVersion": "15.9.17+28307.905",
      "requiredEngineVersion": "1.18.1049.33485"
    },
    "properties": {
      "campaignId": "1774105433.1570455446",
      "channelManifestId": "VisualStudio.15.Release/15.9.17+28307.905",
      "nickname": "",
      "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installershell.exe"
    }
  },
  {
    "instanceId": "VisualStudio.14.0",
    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\",
    "installationVersion": "14.0"
  },
  {
    "instanceId": "VisualStudio.10.0",
    "installationPath": "c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\",
    "installationVersion": "10.0"
  }
]

But in cmake-tools

[visual-studio] [
  {
    "instanceId": "3c73bd68",
    "installDate": "2019-10-07T09:38:54Z",
    "installationName": "VisualStudio/16.3.6+29418.71",
    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community",
    "installationVersion": "16.3.29418.71",
    "productId": "Microsoft.VisualStudio.Product.Community",
    "productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\Common7\\IDE\\devenv.exe",
    "isPrerelease": false,
    "displayName": "Visual Studio Community 2019",
    "description": "????? IDE????????????????????",
    "channelId": "VisualStudio.16.Release",
    "channelUri": "https://aka.ms/vs/16/release/channel",
    "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
    "installChannelUri": "E:\\Software\\IDE\\vs2019\\offline\\ChannelManifest.json",
    "layoutPath": "E:\\Software\\IDE\\vs2019\\offline",
    "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660893#16.3.6",
    "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660909",
    "updateDate": "2019-10-24T09:24:14.8927651Z",
    "catalog": {
      "buildBranch": "d16.3",
      "buildVersion": "16.3.29418.71",
      "id": "VisualStudio/16.3.6+29418.71",
      "localBuild": "build-lab",
      "manifestName": "VisualStudio",
      "manifestType": "installer",
      "productDisplayVersion": "16.3.6",
      "productLine": "Dev16",
      "productLineVersion": "2019",
      "productMilestone": "RTW",
      "productMilestoneIsPreRelease": "False",
      "productName": "Visual Studio",
      "productPatchVersion": "6",
      "productPreReleaseMilestoneSuffix": "1.0",
      "productSemanticVersion": "16.3.6+29418.71",
      "requiredEngineVersion": "2.3.2283.19382"
    },
    "properties": {
      "campaignId": "",
      "channelManifestId": "VisualStudio.16.Release/16.3.6+29418.71",
      "nickname": "",
      "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installershell.exe"
    }
  },
  {
    "instanceId": "d1c3a502",
    "installDate": "2019-11-21T15:04:56Z",
    "installationName": "VisualStudio/15.9.17+28307.905",
    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools",
    "installationVersion": "15.9.28307.905",
    "productId": "Microsoft.VisualStudio.Product.BuildTools",
    "productPath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\Common7\\Tools\\LaunchDevCmd.bat",
    "isPrerelease": false,
    "displayName": "Visual Studio 15 ???? 2017",
    "description": "Visual Studio ????????????? MSBuild ??? .NET ????????? Visual Studio IDE???????? Visual C++ ??????MFC?ALT ? C++/CLI ???",
    "channelId": "VisualStudio.15.Release",
    "channelUri": "https://aka.ms/vs/15/release/channel",
    "enginePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\resources\\app\\ServiceHub\\Services\\Microsoft.VisualStudio.Setup.Service",
    "releaseNotes": "https://go.microsoft.com/fwlink/?LinkId=660692#15.9.17",
    "thirdPartyNotices": "https://go.microsoft.com/fwlink/?LinkId=660708",
    "updateDate": "2019-11-21T15:04:56.1987724Z",
    "catalog": {
      "buildBranch": "d15.9",
      "buildVersion": "15.9.28307.905",
      "id": "VisualStudio/15.9.17+28307.905",
      "localBuild": "build-lab",
      "manifestName": "VisualStudio",
      "manifestType": "installer",
      "productDisplayVersion": "15.9.17",
      "productLine": "Dev15",
      "productLineVersion": "2017",
      "productMilestone": "RTW",
      "productMilestoneIsPreRelease": "False",
      "productName": "Visual Studio",
      "productPatchVersion": "17",
      "productPreReleaseMilestoneSuffix": "1.0",
      "productRelease": "RTW",
      "productSemanticVersion": "15.9.17+28307.905",
      "requiredEngineVersion": "1.18.1049.33485"
    },
    "properties": {
      "campaignId": "1774105433.1570455446",
      "channelManifestId": "VisualStudio.15.Release/15.9.17+28307.905",
      "nickname": "",
      "setupEngineFilePath": "C:\\Program Files (x86)\\Microsoft Visual Studio\\Installer\\vs_installershell.exe"
    }
  },
  {
    "instanceId": "VisualStudio.14.0",
    "installationPath": "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\",
    "installationVersion": "14.0"
  },
  {
    "instanceId": "VisualStudio.10.0",
    "installationPath": "c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\",
    "installationVersion": "10.0"
  }
]

because we force the encoding of the vswhere stdout to be utf8
const vswhere_res = await proc.execute(${sys32_path}\\cmd.exe, vswhere_args, null, { silent: true, encoding: 'utf8', shell: true })

but the fact on my computer, the stdout encoding are GBK

@bobbrow bobbrow added bug a bug in the product and removed more info needed More info is needed from the community for us to properly triage and investigate. labels Mar 27, 2020
@bobbrow
Copy link
Member

bobbrow commented Mar 27, 2020

Newer versions of vswhere support a -utf8 argument. We should update the one we distribute.

@andreeis andreeis added the fixed (release pending) fixed in pre-release and is pending official release label Mar 31, 2020
@andreeis
Copy link
Contributor

CMake Tools 1.4.0 Beta is available on GitHub.
https://github.com/microsoft/vscode-cmake-tools/releases/tag/1.4.0-beta

Please try it out and let us know if you encounter any issues.

@lygstate
Copy link
Contributor Author

fixed

@github-actions github-actions bot locked and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: kits fixed (release pending) fixed in pre-release and is pending official release
Projects
None yet
Development

No branches or pull requests

3 participants