How can I add additional reference to CLR stored procedure?

Hello,
I'm developing CLR stored procedure in C# for MS Sql 2005.
I need to use System.DirectoryServices but
I don't know how to add reference to this dll in my project???

Best Regards
FooKy
LVL 11
f_o_o_k_yAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

digital_thoughtsCommented:
System.DirectoryServices isn't available in a SQL project in VS 2005 because its not an "approved" dll. Basically certain system assemblies are considered to not be used from inside SQL Server, because they can cause problems or they have not been fully tested from inside SQL Server.

But, you can register the assembly manually in SQL Server using the CREATE ASSEMBLY in SQL Server Management Studio. Once you've done that, the assembly will be available to reference from your SQL Server project. You will probably have to register the assembly as UNSAFE.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
f_o_o_k_yAuthor Commented:
GREAT. :) Thanks that was it.
0
buri8128Commented:
This article describes how to add reference  to Linq so you could use the namespace System.Linq with all the linq operators.
http://luke.breuer.com/time/item/SQL2005_using_LINQ_in_SQLCLR/213.aspx
I wanted to use the Linq to xml in my CLR.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.