9 February, 2010
0 Comments
0 categories
If you want to add a reference to the System.Xml.Linq.dll in a SQLServerProject VS2008 or any other external assembly just create a normal class library add all you’re references and deploy the created assembly:
CREATE ASSEMBLY [Rvl.Prototype.CommonClassLibrary.dll] FROM 'C:\Temp\Rvl.Prototype.CommonClassLibrary.dll' WITH PERMISSION_SET = UNSAFE GO
After deploying the normal assembly you can reference that assembly in you’re SqlServerPorject by clicking “Add reference” > SQL Server
Using the “UNSAFE” permmission set might result in errors make sure you’re SQL Server instance has clr enabled:
sp_configure 'clr enabled', 1; GO RECONFIGURE; GO
And you’re database property TRUSTWORTHY is ON:
ALTER DATABASE Mydatabase SET TRUSTWORTHY ON; GO
The user executing the stored procedure must be sysadmin or you must set correct prermissions, see google.
Tags: C#SQL Server