MZ-Tools Articles Series: HOWTO: Autoload a Visual Studio package

One of the first things that you learn about Visual Studio packages is that by default they are loaded on demand (delayed loading), not when Visual Studio launches (because there are tons of them and it would take a lot of time, CPU and memory to load all of them).

To show their user interface (for those that have one) without loading them, Visual Studio uses a trick: the UI is created and persisted on disk at installation time; the same “permanent UI” approach that is also available to add-ins, although add-ins have also the “temporary UI” approach.

However, what if you really need to load a package on startup? (for example because it needs to listen to VS events). It happens that the answer is more complicated than just a binary flag. It is made with an attribute with a special Guid. My second article about packages explains it, with some insight of the whole mechanism from that attribute and Guid to the Windows registry where Visual Studio locates which packages to autoload and when:

HOWTO: Autoload a Visual Studio package
http://www.mztools.com/articles/2013/MZ2013027.aspx