How to: Deploy SQL Server CLR Integration Database Project Items in Referenced Assemblies
You cannot deploy SQL Server Common Language Run-time (SQL CLR) database project items in referenced assemblies by using the deployment features in Visual Studio. You must use the Transact-SQL Create Assembly statement instead. For example, if one SQL CLR database project contains a reference to another SQL CLR database project, you cannot use the deploy command in the first project to deploy the items in the second (referenced) project.
To deploy SQL CLR project items in referenced assemblies
Build the items in your project, a well as any items that have to be built in the referenced assembly.
Deploy the items using the Transact-SQL Create Assembly statement, passing in the information for the DLL that you want to deploy to the SQL Server. For more information, see the Create Assembly (Transact-SQL) topic on the Microsoft Web site.
Important
You must have the appropriate permissions to deploy a new or updated assembly to a database. For more information, see Required Permissions for Database Features of Visual Studio.
See Also
Tasks
How to: Create and Run a SQL Server Stored Procedure by using Common Language Run-time Integration
How to: Create and Run a SQL Server Trigger by using Common Language Run-time Integration
How to: Create and Run a SQL Server Aggregate by using Common Language Run-time Integration
How to: Create and Run a SQL Server User-Defined Type by using Common Language Run-time Integration
Walkthrough: Creating a Stored Procedure in Managed Code
How to: Debug a SQL Server CLR Integration Stored Procedure
Reference
Attributes for SQL Server CLR Integration Database Projects and Database Objects
Concepts
Introduction to SQL Server CLR Integration (ADO.NET)
Advantages of Using Managed Code to Create Database Objects
Creating SQL Server Objects in Managed Code