NamingStyleCodeFixProvider current depends on an IWorkspaceService, ISymbolRenamedCodeActionOperationFactoryWorkspaceService. See https://github.com/dotnet/roslyn/blob/ace0fdea9733b9b6842495a17873acf6c9bf0d60/src/Features/Core/Portable/CodeFixes/NamingStyle/NamingStyleCodeFixProvider.cs#L133-L142
This prevents it from being ported into a NuGet package. We should remove this dependency to unblock this port.
Can we just use Renamer?
Yes, but it seems like that will stop the following code from being invoked: https://github.com/dotnet/roslyn/blob/ace0fdea9733b9b6842495a17873acf6c9bf0d60/src/VisualStudio/Core/Def/Implementation/Workspace/VisualStudioSymbolRenamedCodeActionOperationFactoryWorkspaceService.cs#L64-L79
We will stop notifying all the IRefactorNotifyService implementations, so we need some different mechanism for it.
Essentially every other symbol rename refactoring uses Renamer. We should switch this code fix to also use Renamer, and if something is broken then we need to fix the public Renamer API.
It turns out the code fix does use the Renamer in its primary code action: https://github.com/dotnet/roslyn/blob/ace0fdea9733b9b6842495a17873acf6c9bf0d60/src/Features/Core/Portable/CodeFixes/NamingStyle/NamingStyleCodeFixProvider.cs#L93-L100
It just registers an additional code action CreateSymbolRenamedOperation whose purpose is just to invoke the IRefactorNotifyService implementations. I think we should likely move the latter functionality to the Renamer.
This will be fixed with #47048