If I do this code in a clean addins template in Visual Studio 2008:
public void Exec(....
{
....
Application app = new Application();
MainWindows _mainWindow = new MainWindows();
_mainWindow.Initialize(@"C:\");
app.Run(_mainWindow);
....
}
Opens the window right first time, BUT I can't open the window the second time I try from Tools menu. Why?