clang-power-tools icon indicating copy to clipboard operation
clang-power-tools copied to clipboard

[VS2019] VsWhere could not detect Visual Studio 2017 Microsoft.VisualStudio.Product.Enterprise

Open matbech opened this issue 5 years ago • 11 comments

On Visual Studio 2019 Preview 4 (RC), I get the following error when running compile or tidy:

VsWhere could not detect Visual Studio 2017 Microsoft.VisualStudio.Product.Enterprise. At C:\users\mb\appdata\local\microsoft\visualstudio\16.0_a842d04d\extensions\ks1vy2qo.dxa\psClang\visualstudio-detectio n.ps1:128 char:17

  • ... throw "VsWhere could not detect Visual Studio $($global:c ...
  •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (VsWhere could n...uct.Enterprise.:String) [], RuntimeException
    • FullyQualifiedErrorId : VsWhere could not detect Visual Studio 2017 Microsoft.VisualStudio.Product.Enterprise.

I have no idea why clang-power-tools is looking for Visual Studio 2017.

matbech avatar Mar 02 '19 22:03 matbech

Hello,

Please attach a verbose log so that we can further investigate this. You can enable Verbose logging from the Clang Power Tools settings.

Regards, Gabriel

hero101111 avatar Mar 03 '19 08:03 hero101111

I'm afraid we cannot reproduce this scenario, using VS 2019 Preview 4 and CPT 4.8.1. Does your project, by any chance, use platform toolset v141?

hero101111 avatar Mar 04 '19 12:03 hero101111

Thank you for looking into it. Unfortunately, I can no longer reproduce it either. It only happened the first time I used CPT. There were no v141 projects in the solution.

matbech avatar Mar 04 '19 13:03 matbech

I'm closing this issue as it can no longer be reproduced. Thank you for your feedback.

Regards, Gabriel.

hero101111 avatar Mar 04 '19 17:03 hero101111

Is this supposed to recur when a project uses toolset v141? I am seeing error where vswhere is searching for MSVC 2017, but I don't have MSVC 2017 installed. I do have MSVC 2019 with both v141 and v142 toolsets.

bhardwajs avatar May 22 '19 04:05 bhardwajs

Yes, Clang Power Tools will try to use Visual Studio 2017 for projects with v141 toolset. However, there's shouldn't be an error raised in your case, when only VS2019 is installed.

We're looking into it.

hero101111 avatar May 22 '19 13:05 hero101111

Should this issue be marked as open or would you like me to create a new issue? Please do let me know if I can provide anything to help debug.

bhardwajs avatar May 23 '19 22:05 bhardwajs

I had an instance of this and the clang-build.ps1 scripts look like they do a test for the version in the default location; I had an empty folder in the default location so while it checked for '2017' (empty), it then caused an error because the version wasn't detected. Removing the folder seemed to fix everything (finding 2019, which is installed).

spaceyjase avatar Sep 20 '19 10:09 spaceyjase

I have the same issue when using CPT with VS 2019 in a project created in VS 2017. I had no previous VS 2017 installations before. Installing it fixes the problem.

kd496 avatar Sep 21 '19 17:09 kd496

Hi there, I'm using Microsoft Visual Studio Community 2019 Version 16.9.3.

I've just installed clang power tools and tried to run tidy on a file. I get this error:

VsWhere could not detect Visual Studio 2017 Microsoft.VisualStudio.Product.Community.

I'm not seeing a fix or relevant solution in this thread?

mttjcksn avatar Apr 27 '21 12:04 mttjcksn

Hello @mttjcksn ,

It would be helpful to know which toolset your project is using.

Regards, Gabriel

hero101111 avatar Apr 27 '21 19:04 hero101111

Hi @bhardwajs, @spaceyjase, @kd496, @mttjcksn,

Do you still have the same issue?

Kind regards, Marina

mariru27 avatar Jul 06 '23 07:07 mariru27

Nope! Everything works these days (VS2020) :)

spaceyjase avatar Jul 06 '23 07:07 spaceyjase

I am glad to hear that @spaceyjase, I will close this issue.

Thank you for your quick answer :)) If you find another problem, don't hesitate to open an issue

Have a nice day, Marina

mariru27 avatar Jul 06 '23 08:07 mariru27