title: How can a visual studio extension target both 2013 and 2015 while referencing TFS client dlls
body: <p>I have a visual studio extension (deployed as .vsix) that needs to support both Visual Studio 2013 and 2015.</p>
  
  <p>The problem is that the extension needs to talk to TFS so it uses the TFS client libraries and in VS2015, these were changed from being GAC deployed to <a href="https://stackoverflow.com/a/30158212/8521">be a nuget package</a> that the consuming app should redistribute.</p>
  
  <p>How should I setup my VS package's references so that it works on both versions of Visual Studio?</p>
  
  <hr>
  
  <p>I've tried several approaches:</p>
  
  <ol>
  <li>Reference the 2013 GAC dll's: When loading on a VS2015 machine, these DLLs  cannot be found.</li>
  <li>Reference 2013 GAC dll's but also copy-local (bundle with .vsix): Some other dependency of those DLLs were missing.</li>
  <li>Reference 2015 dll's (from nuget) and bundle with .vsix: Loads fine in both 2013 and 2015, but doesn't work in 2013 (actually using TFS functionality fails - for example a call to  <code>GetLocalWorkspaceInfo("c:\src\path")</code> returns null)</li>
  </ol>