title: Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=10.0.0
body: <ul>
  <li>OS : Microsoft Windows NT 5.2.3790 Service Pack 2 Version: 2.0.50727.42 </li>
  </ul>
  
  <p>Doing: creating Tables... </p>
  
  <blockquote>
    <p>Rec: system.m.FileNotFoundexception: could not load file or assembly
    'microsoft.sqlserver.smo, version=10.0.0.0, culture=neutral File name:
    'microsoft.sqlserver.smo, version=10.0.0.0, culture=neutral,
    PublicKeyToken=89845dcd8080cc91' at
    claimsure.Forml.Runsqlscript(string connstring, streamReader sr) at
    myapp.Forml.bw_Dowork(object sender, DoworkeventArgs e) 'MN: Assembly
    binding logging is turned OFF. To enable assembly bind failure
    logging, set the registry value
    (NKLm\software\microsoft\Fusion!enableLog] (DwoRD) to 1. Note: There
    is some performance penalty associated with assembly bind failure
    logging. To turn this feature off, remove the registry value
    (NKLm\software\microsoft\Fusion!enableLog).</p>
  </blockquote>
  
  <p>I get the above error when running my application on a Windows 2003 server with SQL Server 2005.</p>
  
  <p>I know there is a solution to download SQLServer2005_XMO from <a href="http://www.microsoft.com/en-us/download/details.aspx?id=24793" rel="nofollow">http://www.microsoft.com/en-us/download/details.aspx?id=24793</a></p>
  
  <p>I have done this, but after the install a server reboot is required, which is not feasible for the time being. </p>
  
  <p>I need to make use of the server object.</p>
  
  <pre><code> using Microsoft.SqlServer.Management.Smo;
   using Microsoft.SqlServer.Management.Common;  
  
          using (SqlConnection connection = new SqlConnection(connString))
          {
              Server server = new Server(new ServerConnection(connection));
              server.ConnectionContext.StatementTimeout = 2400;
              server.ConnectionContext.ExecuteNonQuery(sqlString);
  
          }
  </code></pre>
  
  <p>Is is possible to load the dll in the same directory as my app and reference it from within the code? </p>
  
  <p>Thanks.    </p>
  
  <p>edit: added full error</p>