I am rewriting an old Visual Studio Extension to the new model.
I still need to use the AsyncPackage (concept) in a InProcComponent to catch a IVsSolutionEvents.
The remaining part of the code is in the OutOfProcComponent.
I use an OutputChannel to inform the user about what the extension is performing.
The InProcComponent is Notifying that a project is loaded (from IVsSolutionEvents) to the OutOfProcComponent and the notification code create an output channel to write a message. Everything is fine.
I have commands and when I use the same output channel, I see in the output window a double entry with the first messages but not the second.
By investigating I was able to identify that the components (In and Out) are running in a different process => the In doing the notification to the Out is running the code in one, so the CreateOutputChannelAsync (even via a Singleton pattern) is a specific instance and the commands executed only in the Out are running in another process => so another singleton instance is created.
As the code to create the output channel is the same and use the same name, I have a double entry in the output window of Visual Studio and new messages are not sent to one of the output channels.
My work around will be to create 2 different channels, but I would like to use one!
Any idea how to solve this?
I am rewriting an old Visual Studio Extension to the new model.
I still need to use the AsyncPackage (concept) in a InProcComponent to catch a IVsSolutionEvents.
The remaining part of the code is in the OutOfProcComponent.
I use an OutputChannel to inform the user about what the extension is performing.
The InProcComponent is Notifying that a project is loaded (from IVsSolutionEvents) to the OutOfProcComponent and the notification code create an output channel to write a message. Everything is fine.
I have commands and when I use the same output channel, I see in the output window a double entry with the first messages but not the second.
By investigating I was able to identify that the components (In and Out) are running in a different process => the In doing the notification to the Out is running the code in one, so the CreateOutputChannelAsync (even via a Singleton pattern) is a specific instance and the commands executed only in the Out are running in another process => so another singleton instance is created.
As the code to create the output channel is the same and use the same name, I have a double entry in the output window of Visual Studio and new messages are not sent to one of the output channels.
My work around will be to create 2 different channels, but I would like to use one!
Any idea how to solve this?