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

Improve VS2017 detection by leveraging VSWhere.exe #13

Closed
khouzam opened this issue Aug 14, 2017 · 9 comments
Closed

Improve VS2017 detection by leveraging VSWhere.exe #13

khouzam opened this issue Aug 14, 2017 · 9 comments
Labels
Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.

Comments

@khouzam
Copy link

khouzam commented Aug 14, 2017

With support for multiple versions of VS2017, using vswhere.exe to detect the location of an appropriate install would be easier.

@zadjii-msft zadjii-msft added Product-Colortool This is a problem with the utility application ColorTool for manipulating the console color palette. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Aug 14, 2017
@amweiss
Copy link
Contributor

amweiss commented May 8, 2019

Happy to get a PR in for this @zadjii-msft , would the preferred approach be to require choco install vswhere, just require a version of vswhere be on the PATH before running razzle or something else?

@DHowett-MSFT
Copy link
Contributor

DHowett-MSFT commented May 8, 2019 via email

@amweiss
Copy link
Contributor

amweiss commented May 8, 2019

I have VS2019 and VS2019 Preview installed through the installer and the included VSWhere was not added to my path by default. I can try to locate vswhere to then locate msbuild, or just require it be on the path somehow for it to run.

@zadjii-msft zadjii-msft added Help Wanted We encourage anyone to jump in on these. and removed Product-Colortool This is a problem with the utility application ColorTool for manipulating the console color palette. labels May 8, 2019
@heaths
Copy link
Member

heaths commented May 8, 2019

We don't add it to the PATH because it's not an oft-enough used tool. Every directoryt added to PATH merely increases lookup time.

I recommend you acquire vswhere.exe via nuget or chocolatey, as described here. You can use the version we always install to "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" but you're rolling the dice on what features you get. For example, I just resolved a bug against vswhere because someone was using that path and trying to use the -find parameter that was added later. The only way to be sure you get the features you want is either use the ones we added initially (but that started in 15.2) or acquire it yourself. You can also redist it, which is what build systems like Azure Pipelines do (it's used by various built-in tasks).

@amweiss
Copy link
Contributor

amweiss commented May 8, 2019

Thanks, I just got a version of razzle.cmd working with the chocolatey version and the -find parameter actually. It seems a bit heavy handed to put a choco install vswhere in razzle.cmd, but that would ensure it's a one step setup process. I'll post a PR in a few hours we can worth though, but on my environment it worked well.

@heaths
Copy link
Member

heaths commented May 8, 2019

Then why not use nuget? You already are using nuget generally, so put "vswhere" in your .nuget\packages.config file and it will get pulled if needed* whenever nuget restore is run in the repo. That's what a lot of our repos do - even vswhere itself. You could assume a hardcoded path in your script even, but you'll have to remember to update it if you ever update to a newer version in packages.config. Or do what we do and scan for it.

@amweiss
Copy link
Contributor

amweiss commented May 9, 2019

I have a version started here: #606 but I can't get the build tools v141 working in VS2019. I don't want to mix that into this change so I want to get that sorted out before I make it a real PR.

miniksa pushed a commit that referenced this issue May 10, 2019
* Update razzle to use vswhere

* Make vswhere pickup build tools

* Make razzle handle errors better

* Make bcz handle MSBUILD with spaces

* Update readmes to use bcz and fix typo
@amweiss
Copy link
Contributor

amweiss commented May 10, 2019

@khouzam you should be able to close this now that #606 was merged.

@DHowett-MSFT
Copy link
Contributor

Fixed in #606,
Thanks!

ReneeGA2020 pushed a commit to ReneeGA2020/Terminal that referenced this issue May 11, 2019
* Update razzle to use vswhere

* Make vswhere pickup build tools

* Make razzle handle errors better

* Make bcz handle MSBUILD with spaces

* Update readmes to use bcz and fix typo
miniksa pushed a commit that referenced this issue Oct 4, 2019
Added resize API for the terminal renderer
carlos-zamora pushed a commit that referenced this issue Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted We encourage anyone to jump in on these. Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work.
Projects
None yet
Development

No branches or pull requests

5 participants