views:

5

answers:

1

Hi folks. How do you create a VSPackage that has a dependency on functionality in another VSPackage? In other words, if I have VSPackage A that exports a certain feature that I need in VSPackage B, how do I ensure that VSPackage B is loaded first?

Thanks Matt

A: 

Presumably, this is a VS Service that you're exposing from VSPackage B? If that's the case, Visual Studio will automatically load the package when you request it from VSPackage A via a call to Package.GetService.

There is also an API method to force-load a package, but using it generally means you're doing something wrong. :-) You should rely on VS to delay-load packages as necessary.

Aaron Marten