StefanKert / BuildVision

A Visual Studio extension to visualize the building process.
MIT License
261 stars 43 forks source link

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

Open BroMarduk opened 2 years ago

BroMarduk commented 2 years ago

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
StefanKert commented 2 years ago

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 :)

BroMarduk commented 2 years ago

See attached solution below and the steps to reproduce this.

Here is a test solution I used. VideoGames.zip

image

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.

willl commented 2 years ago

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
BroMarduk commented 2 years ago

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