Adding References to other Assemblies

  • I would like my SQL CLR procedures to be able to use some of the same utility and business object classes that my ASP.Net project uses. When I go to ada a reference in my VS 2008 CLR project to one of these class, I get the error message:

    A reference to 'UtilLib' could not be added. SQL Server projects can reference only other SQL Server projects.

    This sort of code reuse seems to be pretty basic. Is there a way do what I want to do, i.e. access the same assembly from bith my CLR code and my ASP.Net code?

    John

  • John,

    Register the library as an assembly in SQL Server using CREATE ASSEMBLY.

    Open the Object Browser in Visual Studio and add or locate the library in there.

    Click the button on the toolbar to add the reference to the SQL Server Project.

    Deploy as usual.

    Cheers,

    Paul

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply