Search code examples
visual-studiotfsvisual-studio-2017

Is there an option for Visual Studio so that Resume Suspended Work does not deletes the shelveset?


TFS creates a shelveset when you suspend work in Visual Studios 2017. When you then resume the suspended work TFS deletes the shelveset. Is there an option to preserve shelvesets on the server when unsuspecting work?


Solution

  • All active Work Items and currently Pending Changes are considered In Progress Work. If the Suspend button is clicked, system will shelves the code along with references to the active Work Items, currently open files, breakpoints, etc.

    Basically, the current state of Visual Studio is saved for later recovery. Modified files will be reverted to the Latest Version.

    Then when you select ‘Switch’ or ‘Resume’ and the suspended work would be recovered along with the previous state of Visual Studio. The code can then be checked in. The shelveset will be deleted automatically.

    If ‘Switch’ is chosen, then the current work is suspended before the selected work set is restored. After check-in is complete, then the previous work [for instance, 2 edit(s)] can be ‘Resumed’.

    enter image description here

    There is not any option to preserve shelvesets on the server when unsuspecting work. As a workaround you could first shelve your pending changes and work first, make sure check preserve pending changes locally, then suspend your work.

    There will a shelveset which contain your previous work and record in server side.

    enter image description here