title: Deploying WCF Client assembly in SQL2005
body: <p>I'm trying to get a WCF Client assembly deploy in SQL 2005. This means I need to create/register the dependencies for my WCF Client, which are:</p>
  
  <ul>
  <li>System.Runtime.Serialization</li>
  <li>System.Web</li>
  <li>System.ServiceModel</li>
  </ul>
  
  <p>With this script:</p>
  
  <pre><code>CREATE ASSEMBLY System_Runtime_Serialization FROM 'C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\System.Runtime.Serialization.dll'
  WITH PERMISSION_SET = UNSAFE
  GO
  
  CREATE ASSEMBLY System_Web FROM 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Web.dll'
  WITH PERMISSION_SET = UNSAFE
  GO
  
  
  CREATE ASSEMBLY System_ServiceModel FROM 'C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\System.ServiceModel.dll'
  WITH PERMISSION_SET = UNSAFE
  GO
  </code></pre>
  
  <p>Registration of System.Web.dll fails with this error message:</p>
  
  <pre><code>Assembly 'System.Web' references assembly 'system.web, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: version, culture or public key mismatch). Please load the referenced assembly into the current database and retry your request.
  </code></pre>