7 Hours of hell
Recently I start using project generator not only to generate makes, projects and solutions but also to generate some code. Because of that from time to time I need to run one python script. This is not big problem but I decided to make my life easier and add button in Visual Studio 2010 (I'm working slowly on progression to new one) which will trigger this task. Sound simple right ?
I started like each good programmer from project generated from template. I started look around what happening there and slowly understanding how all this works. Google helping me a lot with this task there are some tutorials how to do plugins. With each minute everything starting make sens I'm optimistic in finishing plugin in next hour.
I spend some tome on figuring out how to add item to main menu. It's working now and I just need to automatically create toolbar and I will be in sweet spot.
Finished, cleaned up and ready to go. This was nice experience. It took some time but this were new stuff for me so I don't mind. Time to return to game development. Starting project solution and ....
What the heck ? Plugin stopped working. But moment ago it was working :| Well I probably do something wrong.
Investigation shown me that plugin only works properly when VS is started with :
/resetaddin WrTools.ConnectOther way it's behave weird. I'm continue looking.
Persistent Mode of plugin is persistent for few starts:
- With /resetaddin - Work fine
- Without #1 - Work fine
- Without #2 - Only one button is in main menu and Toolbar is empty
- Without #3 - Nothing works
This is madness how the f*** this work. This not make sense at all.
Google don't help too much. I cannot find any useful information and make it work. The more I look into it the less sense all this issue have :/
In desperation I looked to Qt plugin source code to figure out how they do it. And surprise the recreate whole UI each time you start VS:/ I will do similar I just want to make it work and forgot about this ;(
Right now plugin works but I gave up on toolbar generated from code. It created me so much issue that I created it manually in vs.
In the end I really doubt that final effect was worth all this time spend on it. Maybe I was doing something wrong and there is magic function that fixed everything. If so then this whole stuff is broken in roots because after all this time I couldn't figure out what I was doing wrong.
I want to believe that in never version of Visual Studio they improved this stuff and made it easier. If not I would really not recommend doing any integration with VS I don't think its worth it.