locked
How can you add a c# assembly DLL project reference to a SQL Server Project ? RRS feed

  • Question

  • Hi everyone

    I'm trying to add a C# class library project reference to my SQL Server Project (SSP), only the SSP only seems to want to add other SQL Server Projects.  This is a pain if you want to call functions from say your shared assembly.  How can you add a regular non-SSP project reference?

    I guess I could just create the assembly as a regular c# class library and add the SSP references myself (Microsoft.SqlServer.Server) but how do you keep the nice integrated debugging that you get with the SSP project type?

    I cannot understand why SSP project type doesn't support adding class libraries to it! :)

    Thanks
    Tuesday, September 29, 2009 4:36 PM

Answers

  • A class library will appear on the list if its either an approved system
    library or if it has been cataloged with create assembly to the database
    that's set as the deployment database. This is so that auto-deploy is
    guarenteed to work. This is an FAQ, there are quite a few forum threads
    about it, and Niels wrote a blog entry about it here:
    http://www.sqldevelop.com/visual-studio-and-deployment-of-sqlclr-assemblies/.
    The easiest way out is not to use auto-deployment but use ClassLibrary
    projects and write your own DDL statements.

    There's also a thread on this forum that included a workaround I hadn't
    thought of (but can't really recommend)...hand editing the project file.

    Hope this helps,
    Bob Beauchemin
    SQLskills
    • Marked as answer by Reg_H Wednesday, September 30, 2009 9:58 AM
    Tuesday, September 29, 2009 7:54 PM

All replies

  • A class library will appear on the list if its either an approved system
    library or if it has been cataloged with create assembly to the database
    that's set as the deployment database. This is so that auto-deploy is
    guarenteed to work. This is an FAQ, there are quite a few forum threads
    about it, and Niels wrote a blog entry about it here:
    http://www.sqldevelop.com/visual-studio-and-deployment-of-sqlclr-assemblies/.
    The easiest way out is not to use auto-deployment but use ClassLibrary
    projects and write your own DDL statements.

    There's also a thread on this forum that included a workaround I hadn't
    thought of (but can't really recommend)...hand editing the project file.

    Hope this helps,
    Bob Beauchemin
    SQLskills
    • Marked as answer by Reg_H Wednesday, September 30, 2009 9:58 AM
    Tuesday, September 29, 2009 7:54 PM
  • Thanks Bob for the quick reply and that link.

    Really appreciated.
    Wednesday, September 30, 2009 9:58 AM