Closed OdedRadi closed 4 years ago
Thanks for posting this. I especially like your second commit to catch the OnAfterSave event. That disables the issues that actually kept me from using this plugin in real-life (as git rebase caused issues with Visual Studio running, I would expect that no longer to be an issue with this strategy.
Going to check it out soon and merge it in.
Hi, are you to going to post this extension in visual studio marketplace?
Good suggestion to publish it there as well. Fixed some async stuff for newest vs2019 and published:
https://marketplace.visualstudio.com/items?itemName=paralleldimension.AutoSortVcxprojFilters
VCXFilterSorter.cs: FileSystemWatcher invokes 'Change' events for any vcxproj file changed in the directory, when we have multiple projects in the same directory, this cause end-less events loop. a. Changed the FileSystemWatcher filter. b. 'Sort()' should not be static, and handle enable / disable raising event, and have his own vcxproj.filters file name.
AutoSortPackage.cs: In 'UpdateTrackedFilters()', Find returns wrong obj if the 'projects' array order changed after loading more projects.
SortAllCommand.cs: In 'MenuItemCallback()', Using 'Sort()' will handle disable / enable raising events.
Edit:
Add more commit to catch OnAfterSave event for files, not need using FileSystemWatcher at all.