| title | Create a delivery extension library | |||
|---|---|---|---|---|
| description | Find out how to assign a delivery extension that you create in Reporting Services to a unique namespace and build it into a library or assembly file. | |||
| ms.date | 09/25/2024 | |||
| ms.service | reporting-services | |||
| ms.subservice | extensions | |||
| ms.topic | reference | |||
| ms.custom |
|
|||
| helpviewer_keywords |
|
Each [!INCLUDEssRSnoversion] delivery extension you create should be assigned to a unique namespace and built into a library or assembly file. The exact name of the namespace isn't important, but it must be unique and not shared with any other extension. You should create your own unique namespaces for your company's delivery extensions.
The following example shows the code to begin a [!INCLUDEssRSnoversion] delivery extension, which uses the namespaces that contain the delivery interfaces and any utility classes.
Imports System
Imports Microsoft.ReportingServices.Interfaces
Namespace CompanyName.ExtensionName
... using System;
using Microsoft.ReportingServices.Interfaces;
namespace CompanyName.ExtensionName
{
... When compiling a [!INCLUDEssRSnoversion] delivery extension, you must supply to the compiler a reference to Microsoft.ReportingServices.Interfaces.dll, because the delivery extension interfaces and classes are contained there. The xref:Microsoft.ReportingServices.Interfaces namespace is needed to implement the xref:Microsoft.ReportingServices.Interfaces.IExtension interface, the xref:Microsoft.ReportingServices.Interfaces.IDeliveryExtension interface, and more. For example, if all the files containing the code to implement a [!INCLUDEssRSnoversion] delivery extension written in C# were in a single directory with the extension .cs, the following command would be issued from that directory to compile the files stored in CompanyName.ExtensionName.dll.
csc /t:library /out:CompanyName.ExtensionName.dll *.cs /r:System.dll
/r:Microsoft.ReportingServices.Interfaces.dll The following code example shows the command that would be used for [!INCLUDEmsCoName] [!INCLUDEvisual-basic] files with the extension .vb.
vbc /t:library /out:CompanyName.ExtensionName.dll *.vb /r:System.dll
/r:Microsoft.ReportingServices.Interfaces.dll