title: How do you get the current solution directory from a VSPackage?
body: <p>Following is how you would get the current solution directory from an add-in:</p>
  
  <pre><code>_applicationObject = (DTE2)application;  // retrieved from OnConnection method
  string solutionDir = System.IO.Path.GetDirectoryName(_applicationObject.Solution.FullName);
  </code></pre>
  
  <p>How would you do this via a VSPackage?</p>
  
  <p>I'm migrating a visual studio add-in to a VSPackage as I'm intending to add some user controls that require a deeper integration with the IDE.</p>
  
  <p>I found some good references on the relative merits of add-ins vs integration packages such as:
  <a href="http://nayyeri.net/visual-studio-addin-vs-integration-package-part-1" rel="noreferrer">http://nayyeri.net/visual-studio-addin-vs-integration-package-part-1</a></p>
  
  <p>And some good tutorials on msdn on VSPackages such as:
  <a href="http://msdn.microsoft.com/en-us/library/cc138589.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/cc138589.aspx</a></p>
  
  <p>I haven't found a good reference yet (on msdn or otherwise) on how the higher level interfaces in add-ins (such as DTE) map to lower level interfaces in VSPackages.</p>
  
  <p>Any good references out there to help with general mapping from add-in interfaces to VSPackage interfaces?</p>