I am a developer of a Visual Studio extension and I faced a strange problem. I have received a ticket, where user's Visual Studio sometimes recreates the toolwindow of my extension. The window with the extension is on autohide, and when user moves cursor to the extension's tab - an error occurs. The "Initialize()" method is designed to run once, I can not even imagine, that Visual Studio recreates the toolwindow. In what cases can Visual Studio recreate an extension's toolwindow?
Message: Operation is not valid due to the current state of the object.Source: MyExtension
TargetSite: Void MyExtension.MyToolInitializer.Initialize()
HelpLink:
Type: System.InvalidOperationException
Stack:
at MyExtension.MyToolInitializer.Initialize()
at MyExtension.View.MyToolControl..ctor()
at MyExtension.MyToolWindow..ctor()