Sql – How to reference System.Xml.Linq in SQL Server 2008 CLR Object

\clrlinq-to-xmlsql-server-2008visual-studio-2008

I want to create a CLR Stored Procedure for SQL Server 2008 that references the System.Xml.Linq assembly. According to the documentation (http://msdn.microsoft.com/en-us/library/ms403279.aspx) this assembly is safe for use in SQL Server 2008.

However when I attempt to add a reference using Visual Studio 2008 (Team Suite with GDR R2 installed) this assembly is not listed as one of the available assemblies.

Does anyone know how I can add this assembly to a SQL Server CLR project?

Best Answer

This link may help you.

[...] the “external” assembly must be “pre-deployed” to the server.