sandercox / AutoSortVcxprojFilters

Automatically sort Visual Studio 2013/2015 .vcxproj.filters XML files
Other
4 stars 6 forks source link

Multiple projects issues #2

Closed OdedRadi closed 4 years ago

OdedRadi commented 5 years ago
  1. 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.

  2. AutoSortPackage.cs: In 'UpdateTrackedFilters()', Find returns wrong obj if the 'projects' array order changed after loading more projects.

  3. 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.

sandercox commented 5 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.

OdedRadi commented 4 years ago

Hi, are you to going to post this extension in visual studio marketplace?

sandercox commented 4 years ago

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