title: How to set active project using visual studio automation?
body: <p>Context:
  I am building an Add-in using visual studio 2010. One of the actions is to ensure an Interface exists on a related project. If the interface does not exist, it must be created.</p>
  
  <p>Checking if the interface exists, it not the problem. Creating the interface is.
  I would like to create the interface using AddNewItem(), but this will only work properly on the current active project. </p>
  
  <p>code:</p>
  
  <pre><code>ProjectItem item = VsProject.ProjectItems.Cast&lt; ProjectItem &gt;( ).FirstOrDefault( p =&gt; p.Name == interfaceName );
  if ( item == null )
  {
     item = VsProject.ProjectItems.DTE.ItemOperations.AddNewItem( @"Visual C# Items\Code\Interface", interfaceName+".cs" );
  }
  </code></pre>
  
  <p>Has anybody an idea?
  P.S. To be clear: the Add-in is called from a different project in the same solution.</p>