I'm try to create clr function in c# with this code:
[SqlFunction]
public static string Decrypt(string Input)
{
var test = "";
var url = "http://www.url/feed/";
using (XmlReader reader = XmlReader.Create(url))
{
SyndicationFeed feed = SyndicationFeed.Load(reader);
//MessageBox.Show("Title:" + feed.Title.Text);
//MessageBox.Show("Uri:" + feed.Links[0].Uri);
foreach (SyndicationItem item in feed.Items)
{
test=item.Title.Text;
}
}
return test;
}
when try add that to sql server assembly with this script:
create assembly behzad
from 'd:\EDCLR.dll'
i get this error:
Assembly 'EDCLR' references assembly 'system.servicemodel, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', 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: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
how can i solve that?thanks.