0

Is there anything to do when I would need to export my service, so that I could make use of VisualStudio / Roslyn components but the interface is internal? I cannot implement internal interface nor can I export it.

I am well aware that it is internal because it is likely to change and not meant to be used yet. And it could be gone by update 2. This is where unit testing comes into play.

I have good reason for that and already opened this issue here: https://github.com/dotnet/roslyn/issues/9135

Do you have any idea how to bypass that?

Mylan719
  • 93
  • 9

1 Answers1

2

In your particular case, you don't quite need to use that service at all.

IRefactorNotify is a bridge between the Roslyn rename implementation and the existing VS IVsRefactorNotify interface, which is how existing VS features like WPF and WinForms designers handle renames.
You can use that instead.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • Thank you! `IVsRefactorNotify` is not MEF managed is it? Is there any reference source code that shows how to register it, so that it gets called when I do Rename in Code editor?` – Mylan719 Mar 02 '16 at 13:51
  • Is there anyone to ask? Maybe I am registering it wrong I don't know. My guess was that I have to register it as service with service provider. But there are some magic guids. – Mylan719 Mar 03 '16 at 10:42