Skip to content

Select-VSSetupInstance -Latest - is it about install date or version? #40

Closed

Description

Select-VSSetupInstance -Latest - is it about install date or version?

The help says

-Latest [<SwitchParameter>]
    Select the most recently installed instance with the highest version (within the optional `-Version` range).

so it is not clear whether it is about date or version.

If we take a look at the code
then it looks like it is about installation dates and versions are not checked.

If it is true, is it by design that Latest deals with installation dates, not versions?

In any case, the help might be more clear about what is checked.

NB (Just for cross-reference) Loosely related to this issue nightroman/Invoke-Build#122

Activity

  1. heaths commented on Mar 15, 2018

    @heaths
    Member

    "the most recent" means most recently installed, which will have a newer InstallDate. I should be checking for the highest version, and if more than one instance has the same version I should pick the one with the latest InstallDate. But now that you call attention to it, I see it's not sorting based on version like I did in vswhere. I'll get that fixed and make sure I have a test covering it.

  2. added a commit that references this issue on Mar 16, 2018
    4779037
  3. added a commit that references this issue on Mar 16, 2018
    b15ec51
  4. added a commit that references this issue on Jun 21, 2019
    8b1967d
  5. pssewell21 commented on Jul 30, 2019

    @pssewell21

    Heath Stewart (@heaths), I have been experiencing an issue where the -Latest flag is picking my VS 2017 instance that was installed after my VS 2019 instance and I believe this discussion is relevant. @Hadronicus appears to have a solution in pull request #53 to this. I noticed that his pull request has been pending approval for over 5 weeks. Are you waiting on something to approve the pull request? Is there additional work that needs to be done for you to approve it that I'm just not seeing communication for? I'm happy to contribute to the effort if needed. Thanks.

  6. added a commit that references this issue on Jul 31, 2019
    cfd1a1e
  7. heaths commented on Jul 31, 2019

    @heaths
    Member

    To be honest, I missed this somehow. I've merged this and will get the changes published. Thank you for your contribution!

  8. pssewell21 commented on Jul 31, 2019

    @pssewell21

    Thank you Heath Stewart (@heaths) and @Hadronicus.

  9. heaths commented on Jul 31, 2019

    @heaths
    Member

    Unfortunately, we're having a publishing issue at the moment I'm trying to sort out. For now, can you expand the ZIP release and make sure all your existing scenarios work? We have code coverage and detected no regressions, but I'd like to get hands on a prerelease before we push a release (once I get all that working again).

  10. pssewell21 commented on Jul 31, 2019

    @pssewell21

    I'll be able to test this tomorrow. Thanks for the info.

  11. pssewell21 commented on Aug 1, 2019

    @pssewell21

    I've been running into issues getting Visual Studio's installer to update to the newly released version that are currently blocking me from testing this. I'll provide an update as soon as I have one to give.

  12. 3 remaining items

  13. heaths commented on Aug 1, 2019

    @heaths
    Member

    I was able to repro the problem and will be sure to add an integration test. The problem occurs when piping instances to Select-VSSetupInstance because records come in one at a time but needed to be sorted all together. If you pass all instances as a single parameter value to Select-VSSetupInstance -Instance it works correctly. As such, all sorting should just be done in EndProcessing. I'll make the changes but we're still having problems publishing at the moment.

  14. added a commit that references this issue on Aug 4, 2019
    3346d83
  15. pssewell21 commented on Sep 21, 2019

    @pssewell21

    Heath Stewart (@heaths), any idea what the timeline looks like on getting this change into a released version of the tool? Thanks.

  16. heaths commented on Sep 21, 2019

    @heaths
    Member

    Unfortunately, powershellgallery.com is still giving us issues in production. I've pinged the owner again for a status update.

  17. heaths commented on Sep 21, 2019

    @heaths
    Member

    Reopening until published to keep on my radar.

  18. heaths commented on Oct 1, 2019

    @heaths
    Member

    Okay, finally got the powershellgallery.com issue resolved and https://www.powershellgallery.com/packages/VSSetup/2.2.15-g62f3905dea was published. Can you give that a try and make sure everything is working as expected? Then I can publish a release version.

  19. pssewell21 commented on Oct 1, 2019

    @pssewell21

    I'll look into this tomorrow when I get into work. Thanks for the support Heath Stewart (@heaths)

  20. pssewell21 commented on Oct 3, 2019

    @pssewell21

    Just tested this and it appears to behave as I would expect in my environment now! Thanks for your assistance Heath Stewart (@heaths). I apologize for the delayed response, I just got to this.

  21. added a commit that references this issue on Oct 4, 2019
  22. heaths commented on Oct 4, 2019

    @heaths
    Member

    2.2.16 with this fix has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions