I'm having a bit of a problem with a SQLCLR assembly in SQL Server. I'm trying to use System.Messaging, which isn't on the list of natively supported assemblies in 2005, so I've loaded it with
CREATE ASSEMBLY [System.Messaging]
AUTHORIZATION dbo
FROM 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Messaging.dll'
WITH PERMISSION_SET = UNSAFE
So I now have a copy of the assembly in the GAC/On Disk and I have the copy loaded in SQL server. At this point everything works fine.
Now I come along and install service pack 2 for .Net V2 and I start getting the following errors from my SQLCLR assembly
System.IO.FileLoadException: Could not load file or assembly 'System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050)
Having a look around it seems to be a known issue http://support.microsoft.com/Default.aspx?kbid=949080 with no sign of a solution, so I was just wondering if anyone else had to deal with this, and what your solution, if any, was. For the moment I am having to take the brute force approach and drop re-create the assembly when the problem arises.
Cheers,
Stephen.