Share via


How to: Deploy SQL Server Project Items in Referenced Assemblies

SQL Server project items in referenced assemblies cannot be deployed using the deployment features in Visual Studio; use the Transact-SQL Create Assembly statement instead. For example, if one SQL Server project contains a reference to another SQL Server project, you cannot use the deploy command in the first project to deploy the items in the second (referenced) project.

Note

The common language runtime (CLR) integration feature is off by default in Microsoft SQL Server and must be enabled in order to use SQL Server project items. To enable CLR integration, use the clr enabled option of the sp_configure stored procedure. For more information, see Enabling CLR Integration.

To deploy SQL Server project items in referenced assemblies

  1. Build the items in your project, a well as any items that need to be built in the referenced assembly.

  2. Deploy the items using the Transact-SQL Create Assembly statement passing in the information for the dll you want to deploy to the SQL Server. For more information, see the Create Assembly topic in the SQL Server Books Online.

See Also

Tasks

How to: Create a SQL Server Project

How to: Create and Run a CLR SQL Server Stored Procedure

How to: Create and Run a CLR SQL Server Trigger

How to: Create and Run a CLR SQL Server Aggregate

How to: Create and Run a CLR SQL Server User-Defined Function

How to: Create and Run a CLR SQL Server User-Defined Type

Walkthrough: Creating a Stored Procedure in Managed Code

How to: Debug a SQL CLR Stored Procedure

Concepts

Introduction to SQL Server CLR Integration (ADO.NET)

Advantages of Using Managed Code to Create Database Objects

Item Templates for SQL Server Projects

Reference

Attributes for SQL Server Projects and Database Objects

Other Resources

SQL CLR Database Debugging