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

Add Products prop to VSWhereSettings #1973

Closed
sm-g opened this Issue Dec 25, 2017 · 6 comments

Comments

Projects
None yet
5 participants
@sm-g
Copy link

sm-g commented Dec 25, 2017

To use cake on build agent without installed VS (only with Build Tools), I have to use ArgumentCustomization:

var latestInstallationPath = VSWhereLatest(new VSWhereLatestSettings {
        Requires = "Microsoft.Component.MSBuild",
        ReturnProperty = "installationPath",
        ArgumentCustomization = args=>args.Append("-products *")
});
@devlead

This comment has been minimized.

Copy link
Member

devlead commented Dec 25, 2017

There's a VSWhereProducts alias available for this use case

var latestInstallationPaths = VSWhereProducts("Microsoft.VisualStudio.Product.BuildTools");
var latestInstallationPaths = VSWhereProducts("Microsoft.VisualStudio.Product.BuildTools", 
    new VSWhereProductSettings {
        Requires = "'Microsoft.Component.MSBuild" });
@sm-g

This comment has been minimized.

Copy link

sm-g commented Dec 25, 2017

Sorry, did not notice this.

It returns DirectoryPathCollection, how to get single path of latest tool then?

@phillipsj

This comment has been minimized.

Copy link
Collaborator

phillipsj commented Dec 25, 2017

@sm-g

This comment has been minimized.

Copy link

sm-g commented Dec 26, 2017

Why you think VSWhereProducts will return latest version in first position in collection? Docs does not mention that.

@jnm2

This comment has been minimized.

Copy link
Contributor

jnm2 commented Jan 24, 2018

Please add this to VSWhereLatestSettings. It's logical to want to use VSWhereLatest which returns a single path and access vswhere's product filtering on its latest command.

@tbertenshaw

This comment has been minimized.

Copy link

tbertenshaw commented Jun 6, 2018

Has/is this being done? ☝️

devlead added a commit to FroggieFrog/cake that referenced this issue Jan 2, 2019

@devlead devlead closed this in #2356 Jan 2, 2019

devlead added a commit that referenced this issue Jan 2, 2019

Merge branch 'FroggieFrog-feature-vswhere-products' into develop
* FroggieFrog-feature-vswhere-products:
  (GH-1973) added Products to VSWhereLatestSettings * fixes #1973

@devlead devlead added the Improvement label Jan 2, 2019

@devlead devlead added this to the v0.32.0 milestone Jan 2, 2019

devlead added a commit that referenced this issue Jan 4, 2019

Merge branch 'release/0.32.0' into main
* release/0.32.0: (26 commits)
  (build) Updated version and release notes.
  Added support for MSBuild16.
  (maint) tabs to spaces
  Add ResultsDirectory to DotNetCoreVSTestSettings * Improve DotNetCoreVSTest documentation * fixes #2243
  (GH-1973) added Products to VSWhereLatestSettings * fixes #1973
  Adds /sm argument to SignTool
  (GH-2337) Fix TFBuildCommand Directory Separator Character
  (doc) Corrected test method names
  (GH-2419) Add token parameters to GitReleaseManager
  (GH-2420) Added new label alias for GitReleaseManager
  (GH-2410) T4 Global tool support * Adds t4 & t4.exe for tool resolution * Adds Properties & Class to TextTransformSettings * Integration tests for TransformTemplate * Fixes #2410
  (GH-2412) Added PublishCodeCoverage overloads
  (GH-2417) Add additional Tool names for GitReleaseManager
  (build) Update addins&tools,refactor bootstrappers * Switch to Cake.Tool * Update addins & tools, switch to global tools where available * Update to .NET Core SDK 2.1.502 * Rewritten bootstrappers     * Reduce Cake & .NET Core SDK verson from 3 to 2 places (global.json, build.ps1, build.sh -> global.json, build.config)      * Use Cake standard command line parameters (build.ps1 / build.sh called the same way)      * Don't install Cake if same version is installed globally      * Don't install .NET Core if same version installed globally * Start utilizing Cake official containers
  Implement standard zip behavior by default
  Add an Encoding parameter to TextTransformation.Save
  GH2294: Add fluent API to enable MSBuild binary logger
  (GH-2403) Use Mono 5.12.0 on Travis * Fixes #2403
  add missing report types
  Fix nuspec generation when collections are empty instead of null
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment