fernandoescolar / vscode-solution-explorer

This is a Visual Studio Code extension that provides a (.sln) Visual Studio Solution explorer panel..
MIT License
348 stars 73 forks source link

Display files in proj order for F# projects, matches VS #268

Closed farlee2121 closed 1 year ago

farlee2121 commented 1 year ago

Motivation

Improve the F# experience by matching fsproj file ordering with Visual Studio, since F# file order matters for compilation and dependency.

Current Behavior

The solution view sorts files alphabetically for all project types

Behavior after PR

F# files are not sorted in the solution view. They remain in the order they were discovered using the fsproj file. This matches Visual Studio. I also verified behavior for project items that match multiple files. image

I think we could probably close #131. F# files are properly added, renamed, and removed from fsproj files. Not as part of this PR, but it must have become supported by some previous work.

Follow up work

It'd be good to either

It's also a bit unintuitive that new fs files add to the last item group and not to the item group containing other Compile project items. Perhaps we could modify XmlManager.checkCurrentItemGroup to prefer a group containing the same kinds of items before defaulting to the last item group?

farlee2121 commented 1 year ago

I opened another PR for an optional switch to opening project files on click

269

fernandoescolar commented 1 year ago

Thanks!