I’ve developed simple CLR Trigger which uses WCF to send some data. So when I try to deploy CLR Trigger I got exception

Deploy error SQL01268: .Net SqlClient Data Provider: Msg 6503, Level 16, State 12, Line 1 Assembly 'system.servicemodel, version=3.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.' was not found in the SQL catalog.
  An error occurred while the batch was being executed.

Ok, let’s go to add System.ServiceModel assembly to sql server.

image

But if I try add System.ServiceModel assembly I got exception

image

Ok, I just try add smdiagnostics…done. So I just try add system.servicemodel again….ohh no another exception

image

Adding system.runtime.serialization….done. Adding system.servicemodel again … exception

image

Adding system.web…fail, because system.web requires system.drawing.dll

image

Adding system.drawing … done. Adding system.web again … fail and exception

image

Adding system.directoryservices…done. Adding system.web again…exception

image

Adding system.directoryservices.protocols…done. Adding system.web again !!!!!…exception

image

Adding system.enterpriseservices…exception

image

Adding system.runtime.remoting … exception

image

Summary

I can’t add System.Web assembly because it requires System.EnterpriseServices assembly which requires System.Runtime.Remoting assembly which requires System.Web assembly again !!!!! I have absolutely no idea who designed this ugly dependency.