Uninstalling modules

You can uninstall custom modules that were installed via NuGet packages. The uninstallation removes all files and code libraries used by the module and all related database objects.

Note:

  • To uninstall modules, you need to open the project in Visual Studio – uninstallation cannot be performed on certain types of deployed and running websites (for example on Microsoft Azure).
  • You cannot uninstall modules that were transferred directly using the Xperience export and import features.
  • You cannot directly downgrade modules to older versions. However, it is possible uninstall a module and then install a package with an older version.

To uninstall a custom module from an Xperience project, you need to:

  1. Uninstall the module’s NuGet package from the Xperience solution in Visual Studio
  2. Open the website in a browser, which triggers automatic removal of the module’s database objects

Warning: Uninstalling a module deletes all web parts, form controls and page types that are part of the module. If the site contains pages of the given type or the administration uses the given components, the module uninstallation may cause errors or missing content. Make sure that you replace or remove all occurrences of the given web parts, form controls and page types.

Uninstalling the module package from the Xperience solution

Uninstalling modules on web farms

If your application is running in a web farm environment, you need to uninstall the module package from the Xperience project for each web farm server.

  1. Open the Xperience solution file in Visual Studio.
  2. Right-click the CMSApp project in the Solution Explorer and select Manage NuGet Packages.
  3. Uninstall the module package:
    • Find the module package (you can use the Installed filter), select the Uninstall action and click Uninstall.
  4. Clean and then Rebuild the Xperience solution (to ensure that any module assemblies are removed from the project’s bin folder).

All of the module’s files and libraries are now removed from the Xperience project.

Removing the module’s database objects

To finish the module uninstallation, open your Xperience administration application in a browser. During the processing of the first request after you uninstalled the module package in Visual Studio, the system automatically removes the module’s database objects.

Tip: You can uninstall multiple custom modules from the Xperience solution, and then perform the removal of the database objects using a single request.

You can verify that the module was uninstalled successfully in the Event log application – confirm that the log contains an event with the MODULEUNINSTALLED code (ModuleInstaller as the source) and no related errors. View the event details () for information about the modules that were uninstalled.