the blog
Back to -Blog

Fonts, Colors and COM - Darkness Visible?

Amethyst, Flex and COM....
by Dermot Hogan
Wednesday 10 December 2008.

I’ve just been working every hour under the sun to get Amethyst (our new Visual Studio IDE for Adobe Flex development) done and dusted. Finally, beta 1 is out – though it’s a couple of days late.

The reason for this was a very annoying font problem. Every time I selected Fonts and Colors in Visual Studio I got a dialog box telling me that Package ’Visual Studio Explorers and Designers Package’ has failed to load.

A quick search revealed that this is normally due to another package being installed - ’Source Analysis’. The only problem was that I didn’t have this installed!

Even more annoyingly, disabling the package caused the problem to go away – so it wasn’t critical, but it didn’t look very professional, to say the least. Unfortunately, I’d disabled the package loading early on in the testing process and only came across this problem again in the final checkout.

I then spent about a day trying the usual suspects in Visual Studio – and got nowhere. That dammed package still kept failing when I hit Fonts and Colors!

So nothing for it, but to rebuild the Amethyst package from scratch, adding functionality gradually until I got something that failed. As you can imagine, I didn’t take this approach lightly – it’s a lot of work. But I was really, really stuck. Clearly, it was something to do with Amethyst – but what?

Eventually, after several more hours hard slog, I found the problem. I’d missed out the ComVisible attribute on my project automation object, though it was set on the base class. Putting this back in and the Visual Studio Explorers and Designers Package loaded. Woohoo!!

So what’s going on? Well, it looks like a problem in the Visual Studio Explorers and Designers Package combined with my error. Clearly, the Visual Studio Explorers and Designers Package uses automation to get information of some sort from the Amethyst package and, if it didn’t get what it wanted, crashed.

The result for me was two days in the COM salt mines. Arrgh!!

Bookmark and Share   Keywords:  development  general programming
© SapphireSteel Software 2014