BuildVision icon indicating copy to clipboard operation
BuildVision copied to clipboard

BuildVision for 2022 Causing Solution Explorer to sort Folders in different order

Open BroMarduk opened this issue 3 years ago • 4 comments

After installing the preview for BuildVision for 2022, I noticed that my folders in Solution Explorer are now sorted differently. Normally they are alphabetical, but after installing BuildVision they seem to be sorted in the order the projects are loaded from the solution. (All of our projects are in folders, so I don't know if it affects the sorting of projects as well).

If I move stuff around, the next time the solution loads, it displays them in the same initial way, which is what I think is the order they are referenced in the solution file.

Normal Solution Explorer Sorting Normal

Solution Explorer Sorting with BuildVision BuildVision

BroMarduk avatar Dec 01 '21 16:12 BroMarduk

Hi there,

this is actually very weird. I have tried reproducing this issue, but I wasn't able to get that behavior. Are you able to provide a .sln that can be used to reproduce this issue? Thanks in advance @BroMarduk :)

StefanKert avatar Feb 11 '22 21:02 StefanKert

See attached solution below and the steps to reproduce this.

Here is a test solution I used. VideoGames.zip

  • Open Visual Studio 2022
  • Install the BuildVision extension.
  • Close Visual Studio 2022 and let extension install
  • Open Visual Studio 2022
  • Open the test solution.
  • Folders are sorted alphabetically in Solution Explorer

image

  • Open the BuildVision window (View -> Other Windows -> BuildVision)
  • Dock the window in the IDE - I docked it with my error list and output windows (see below image), but you can dock it in the IDE anywhere, it just needs to appear on restart.
  • Close Visual Studio 2022
  • Reopen Visual Studio 2022 and open the test solution

Folders are now in the Solution Explorer not in alphabetical order but in the order they were added to the solution.

image

This only occurs when the BuildVision window is docked for me and it reopens in the same place when Visual Studio is restarted. If I close the BuildVision window so it no longer appears on restart, when I reopen the solution, everything is sorted correctly.

In this example I used folders, but I can recreate the solution with top level projects and get the same result.

BroMarduk avatar Feb 12 '22 04:02 BroMarduk

I've observed similar happening with a solution of mine but didn't think it was possibly related to BuildVision.

I'm able to replicate this behaviour in one particular solution we have, but not others with the BuildVision window as described in the previous post. I don't even need to re-start VS 2022, just need to reload the solution (via File > Recent Projects and Solutions).

Our solution structure is something like this:

Solution folder
-> 01 FolderName
    -> Project 1
    -> Project 2
-> 02 FolderName
    -> Project 3
    -> Project 4
-> 03 FolderName
    -> 03-01 Sub Folder
        -> Project 5
        -> Project 6

willl avatar Feb 23 '22 06:02 willl

After some more experimentation, I can't say 100% the window being docked is necessary. It will happen eventually even without the window docked.

BroMarduk avatar Feb 24 '22 22:02 BroMarduk