---
title: "SDK: Building a Module (Advanced)"
slug: "building-module-advanced"
description: "This document shows users how to create a Custom Module in the Decisions SDK.  Custom Modules are created in the event that a user wants to link several different pieces of custom functionality. The document includes instructions for installation, updating, and best practices to consider when creating a module. "
tags: ["Custom Modules"]
updated: 2025-06-09T16:05:35Z
published: 2025-06-09T16:05:35Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.decisions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SDK: Building a Module (Advanced)

## Overview

Custom modules are created by users to add or extend certain functionalities and to link together different types of custom functionality. While custom modules do not require .dlls, building custom code in a .dll is common. Using a custom module may involve grouping exported Decisions objects, custom Flow behaviors, and/or step implementations together in one module, integrating custom Flow or step implementations with a third-party library, etc.

If a custom module needs to be updated, refer to the [Installing Modules](https://documentation.decisions.com/docs/installing-modules-decisions#updating-the-custom-module) section.

---

## Prerequisite: MSBuild Requirement

- Build Tools for Visual Studio (MSBuild) must be installed in order to build modules.
- [Download Visual Studio Tools - Install Free for Windows, Mac, Linux](https://visualstudio.microsoft.com/downloads/)

---

## Best Practices

When creating a custom module, keep the following best practices in mind:

- If issues arise, please refer to **C:\Program Files\Decisions\Decisions Server\Logs**.
- Contact [support](mailto:support@decisions.com) to remove a custom module.

---

## Creating a Custom Module

1. Install the latest version of [Decisions](https://releases.decisions.com/releases) locally. For more information, refer to the [Installation Guide](https://documentation.decisions.com/v9/docs/installation-guide).
2. From [GitHub](https://github.com/decisions-com/custom-module-example), download the Custom Module by selecting **Code > Download ZIP**.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1742418834221.png)![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1742418878131.png)
3. The example module is named "**CustomModule**". Rename files to match the name of the module that is being created.
4. Open CustomModule.csproj, CustomModule.sln, Module.Build.json, and build.proj and rename instances of "CustomModule" to match the module name.
5. If needed, update the [NuGet package](https://www.nuget.org/packages/DecisionsSDK) reference in the CustomModule.csproj file to the correct version of the SDK.
6. Add a reference to any external or third-party DLLs.  
  

| Module.Build.json Element | Use Relevance | Description |
| --- | --- | --- |
| **CoreServicesDlls** | Most commonly used | This folder contains a DLL or multiple DLLs that define a project's Flow steps, Rule parts, customizations, behaviors, initializer code for setup, and more. If these files have any Web Services registered in this folder, the user will get corresponding ServiceClient DLLs in the ServiceClientDlls folder. These are created by the CreateModule.exe tool. |
| **ReferenceDlls** | Required if third-party dlls are used | Used to store third-party dependencies for a module. |
| **CliDlls** | Most commonly used | See note on CoreServicesDlls. This folder does not usually contain any custom assemblies, only those generated during module build. |
| **WebPages** | Not typically used | HTML or ASPX pages go into the web host's root directory. This folder must contain zip files that are unpacked on module installation. The unpacked files become peers to the Login.aspx page. This folder may contain folders, and those folders will be maintained. |
| **MvcDlls** | Not typically used | Folder for compiled Dlls of MVC views and controllers |
| **MvcViews** | Not typically used | These are additional MVC Views that are hosted in the Decisions.Web. The host is the primary user interface. MvcViews can be used to add additional view controls for pages and forms. These files go to the installation's Web Host/HUI virtual directory. HUI is the virtual directory that serves the HTML portal to users. |
| **AgentDLLs** | Not typically used | Extra DLL files for adding the capability to the Decisions Cloud to Site Agent. If not using the agent and extensions to the product do not need to be run through the agent, this folder can be safely ignored. |
| **SQLScript / MySQLScript / OracleScript / AzureScript** | Not typically used | These are database scripts that will run when the module is deployed. These are often used to add tables or stored procedures that this module relies on. |
| **ObjectsToImport** | Commonly used | Flows, Pages, Reports, Rules, and Folders that have been built by the Decisions designers and exported from Decisions using the Import/Export function. These should be .decObj files. |

**Note:** Below is a summary of default reference DLL handling for modules:
  - **CoreServicesDlls**: You must add the path to your module DLL here.
  - **ReferenceDlls**: You must add **ALL dependency assemblies** required by your module, **if they are not already included** as part of the Decisions platform.
  - **Important:** You **CANNOT** include duplicates of library assemblies that are already part of the Decisions platform. If you are using a library included with the platform, reference the **same version** in your module project’s `.csproj` file.
7. Implement the module functionality by adding class files or custom code.
8. Run **BuildModule.ps1** with PowerShell to build a .dll and create Module.zip. Running **BuildModule.ps1 -deployModuleLocally** builds the DLL file and creates the required module zip file to be deployed in Decisions.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1742934273280.png)
9. Stop the Decisions service and place the zip file into '**C:\Program Files\Decisions\Decisions Server\CustomModules**'. Start the Decisions Server service.
10. Include any custom images inside the CustomImages folder of the Module .zip file. Refer to these images in CSS within MvcStyles to utilize them in the module.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1742934175676.png)
11. Once the Module is deployed, [install the Module](https://documentation.decisions.com/v9/docs/installing-modules-decisions).
12. If any changes are required, make the changes to the code.
13. Run **BuildModule.ps1 -deployModuleLocally** to deploy changes and repeat as needed. ![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1742419093704.png)

---

## Debugging Custom Decisions Modules with VSCode

### Prerequisites:

1. Install VSCode + C# Extension
2. Local Decisions instance running

### Steps:

1. Clone or download a copy of the code.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474260012.png)
2. VSCode must be run as an administrator.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474265960.png)
3. Open the folder containing the module repository.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474272382.png)
4. Select the ‘Debug’ tab, then click “create a launch.json file”.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474280414.png)
5. Select ‘C#’ as the debugger.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474287530.png)
6. Select ‘Attach to a .NET process’. Use “Add Configuration” if not automatically prompted.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474294684.png)
7. Save the launch.json. This will enable the option to start debugging with the new configuration.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474301889.png)
8. Run `.\BuildModule.ps1` successfully before attaching the debugger or setting breakpoints in the code. This command deploys a copy of the module to the local instance. Ensure the module has been initially installed.
9. Click the play button or press F5 to start debugging.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474311811.png)
10. Select `Decisions.Web.Core.exe` as the application to debug.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474319081.png)
11. Add a breakpoint to the code.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474325040.png)
12. Configure the step and debug the Flow.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474331469.png)
13. The breakpoint will pause the Flow of execution during the test run.![](https://cdn.document360.io/6ef8bcc1-6489-4486-9ad1-83acff7e5df0/Images/Documentation/image-1749474337251.png)

---

Related Article:[SDK: Referencing Third Party Libraries](https://documentation.decisions.com/docs/referencing-custom-libraries)

---
