title: Installing Correct Version of Microsoft.SQLServer.Replication.dll
body: <p>I have written an application to control a merge replication process on a sql server. It is running on my development machine with no problem. On my test install I have installed a SQL Server 2008 R2 64 bit on Win 7 64 bit. When I try to use my replication program it crashes with the following exception message</p>
  
  <blockquote>
    <p>[ReplicatorClient.exe] - [Fatal] - [1/15/2015 9:29:56 AM] - Version 0.5.16.0 User - vuser Message - Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. An attempt was made to load a program with an incorrect format.</p>
    
    <p>Stack Trace -<br>
    at ReplicatorClient.Models.DatabaseSynchronization.CreatePublication()<br>
    at ReplicatorClient.ReplicatorWindow.ReplicatorWindowViewModel.MenuCreateSubscription()</p>
  </blockquote>
  
  <p>I have copied the <code>Microsoft.SqlServer.Replication.dll</code> that I am using into my <code>bin</code> folder on my developer machine and am installing it in the program folder on the test machine but the program is obviously not seeing it.  What steps can I take to figure out what I need to do so this dll can be seen and my application can work correctly when deployed?</p>
  
  <p>I am using WIX to install this.</p>