madskristensen / SolutionColors

A Visual Studio extension
Apache License 2.0
77 stars 11 forks source link

Automatically reload color.txt on change #45

Open kotylo opened 4 months ago

kotylo commented 4 months ago

We have a different color per branch defined in color.txt file. The problem is that when switching branches, the solution won't automatically change the color. And reopening VS takes forever, instead of "Reload Changed Files" option.

Possible solution Have some file monitoring implemented of that file. If it changes, then change the color. That is, if file monitoring is supported in VS extensions, since i'm not familiar with the API.

Alternative solutions Maybe manual reload button would also work, although i find everything that is not automated not user friendly.

Maybe it's worth trying another events, such as SolutionEvents.OnAfterLoadProject, SolutionEvents.OnAfterBackgroundSolutionLoadComplete, SolutionEvents.OnAfterLoadAllDeferredProjects. Usually one of the projects have to be reloaded, so that might work.

image