Search code examples
.netvisual-studio-2015roslynvisual-studio-extensionsvsx

How to detect symbol rename in Visual Studio 2015 extension using roslyn?


Is there any way for a Visual Studio 2015 extension to detect when a symbol rename occurs in a solution, and act upon it? Or perhaps this functionality is available in Roslyn somewhere? I found the IRefactorNotifyService in Roslyn, but this seems to be an internal class. Is there a public supported way of doing this? (Either in Visual Studio through EnvDTE or similar, or using Roslyn)?


Solution

  • You're looking for the existing IVsHierarchyRefactorNotify interface, which predates Roslyn.

    In fact, the point of Roslyn's IRefactorNotifyService is to bridge to this VS interface (source)