title: Could not load assembly in Windows Server 2003 in program built with Windows 8.1/Visual Studio 2013
body: <p>I have a program that works on my development PC but not on the server I want to run it on. When I run the program on the server I get this error:</p>
  
  <blockquote>
    <p>Could not load file or assembly 'Microsoft.SqlServer.ConnectionInfo,
    Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or
    one of its dependencies. The system cannot find the file specified.</p>
  </blockquote>
  
  <p>My development PC is Windows 8.1 with Visual Studio 2013 and SQL Server 2012 developer tools. The server is Windows Server 2003 R2, Standard Edition, Service Pack 2 running .NET 4.</p>
  
  <p>I first tried to set Copy Local to true for each assembly that the server couldn't find. Then I finally got an error for an assembly I did't explicitly reference in my program so I figured I might be going about this in the wrong way.</p>
  
  <blockquote>
    <p>Message: Could not load file or assembly
    'Microsoft.SqlServer.SqlClrProvider, Version=11.0.0.0,
    Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
    dependencies. The system cannot find the file specified. StackTrace:<br>
    at
    Microsoft.SqlServer.Management.Common.ConnectionManager.CallerHavePermissionToUseSQLCLR()
    at
    Microsoft.SqlServer.Management.Common.ConnectionManager..ctor(SqlConnection
    sqlConnectionObject)    at
    Microsoft.SqlServer.Management.Common.ServerConnection..ctor(SqlConnection
    sqlConnection)</p>
  </blockquote>
  
  <p>The assemblies I'm using in my program can be installed from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=29065" rel="nofollow">Microsoft SQL Server 2012 Feature Pack</a> but these 2012 packages are not compatible with Windows Server 2003. The latest assemblies I managed to get installed on Win Server 2003 were from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=16978" rel="nofollow">Microsoft SQL Server 2008 R2 Feature Pack</a>, which gets me up to Version 10 of the assemblies on the server. When I try to install these on my Windows 8.1 development PC, I get this error:</p>
  
  <blockquote>
    <p>Installation of Microsoft SQL Server 2008 R2 Management Objects failed
    because a higher version already exists on the machine. To proceed,
    uninstall the higher version and then run Microsoft SQL Server 2008 R2
    Management Objects Setup again.</p>
  </blockquote>
  
  <p>I don't like the idea of going backwards from 2012 to 2008 assemblies on my dev machine, I have to support both SQL Server 2005 and 2012. Is there some way I can tell Visual Studio 2013 to target these older assembly versions?</p>