title: How to create extension working when visual studio 2015 starting?
body: <p>I <a href="https://msdn.microsoft.com/en-us/library/cc138589.aspx" rel="nofollow">find</a> how to create extension (Visual Studio 2015) which create you owner button in menu tools. This link contains some solution for other problem, like to upgrade text editor.</p>
  
  <p>But i cannot understand, how to create visual studio extension, which do some work when visual studio are starting. For example, i need to set some environment values before working in vs.</p>
  
  <p>Have you ever made such extensions? Please, share any instructions you know, or give me some adviсe.</p>
  
  <p>===</p>
  
  <p>I need to set my environment variable for path, where lives my librаries.</p>
  
  <p>For example: a have common folder for all my projects "D:\Projects\Build 1.0.0.100". And in this folder: "Library1", "Library2", "OtherSubsystem", "MySubsystem, "WinDebug", "WinRelease".</p>
  
  <p>Every project has dependence by libraries, and put built result to WinRelease/WinDebug. This depedence expressed by environment variable $ROOT. I can to save this variable in system, but i need to start VS with different ROOT often. In my example, ROOT is "D:\Projects\Build 1.0.0.100".</p>
  
  <p>When i used VS2008, my colleague wrote extension for it. The extension has class, derived by IDTEExtensibility2, ovverride OnConnection method, and subscribe to event SolutuinEvents.Opened. Then code go up in path from solution folder, searching in every folder "Library1". If found, assign to ROOT variable path, where "Library1" found. So, when VS2008 starting, ROOT variable is setting automaticly.</p>
  
  <p>I decided, that this problem possibly to resolve with new extension in VS2015.</p>