---
title:        "Help: My custom module classes are not being imported in Kentico"
description:  "The other day a colleague panicked when his custom module was only partially imported on his co-workers machines. The custom classes were not part of the export package, and he could not figure out what the issue was. While I had encountered this once before, I simply forgot how to fix it. With this post I hope to add the resolution to my long term memory, and ofcourse help everyone who is facing the same issue ;)"
url:          https://www.jeroenfurst.nl/blog/help-my-custom-module-classes-are-not-imported
date:         2017-04-21
category:     CI/CD and deployment
tags:         [CI/CD and deployment, API and customisation]
reading_time: 1
---

# Help: My custom module classes are not being imported in Kentico

> The other day a colleague panicked when his custom module was only partially imported on his co-workers machines. The custom classes were not part of the export package, and he could not figure out what the issue was. While I had encountered this once before, I simply forgot how to fix it. With this post I hope to add the resolution to my long term memory, and ofcourse help everyone who is facing the same issue ;)

The cause of the issue actually contradicts the title of this post. The classes are not being imported because they are not part of the export package. This can be easily identified by opening the export package and looking for the cms\_class.xml.export:
 
 ![Custom modules classes missing in export packages](~/getContentAsset/5537b8ce-ccec-4b3a-8e2d-c5a7b393d133/310c1ea5-13ca-4d75-95a0-620f51989b44/58804f67_class-missing-in-export-packages.PNG.PNG?lang=en-US)
 
 The misleading part of the whole process is that during the creation of the export package, the progress window shows that it exported the classes (while that obviously is not the case):
 
 ![Exporting Classes in Export progress](~/getContentAsset/f8fd5575-7c32-4ba3-9d4a-d91e945015af/310c1ea5-13ca-4d75-95a0-620f51989b44/e6f76ba8_exporting-classes-in-export-progress.PNG.PNG?lang=en-US)
 
 With this info it's kindof hard to "guess" what went wrong. To keep a long story short, the issue was caused because the custom module was **sealed** on the Kentico instance where the export package of the custom module was created. If you create export packages of sealed modules, Kentico will not add the class definition to the export packages.
 
 The best practise is to create unsealed export packages of custom modules during development. Don't forget to uncheck the "Seal the selected modules" when selecting the module object in the export wizard:
 
 ![Uncheck seal the selected modules](~/getContentAsset/9a816e16-9fc3-471a-8b6a-2e35b36afe3a/310c1ea5-13ca-4d75-95a0-620f51989b44/a1489962_seal-the-selected-modules.PNG.PNG?lang=en-US)
 
 This will ensure that the class definition will be added to the export package:
 
 ![Class exists in export packages](~/getContentAsset/952065c1-7135-461a-b4f5-d18fbf7f1dfb/310c1ea5-13ca-4d75-95a0-620f51989b44/a00bc4a4_class-in-export-packages.PNG.PNG?lang=en-US)
 
 And remember that it will only work if your custom module is not sealed in the first place! If you come across a sealed module, I recommend reading the blog post of David te Kloese (Kentico MVP): ['Unseal' your custom installed modules](http://kenticoblog.evident.nl/dtk/august-2015/unseal-your-custom-installed-modules)
 
 Hope this helps!