Cleanup Component

Return to previous page

  • 4/7/2015
  • 2490 Views

Comments

2490 Views

Cleanup Component

Last updated 6 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
DotNetNuke has long had the ability to remove unneeded files during upgrades and installations using a cleanup file. This file was just a text file that contained a list of files to be removed. This functionality was available to both the core framework and module developers and the only requirement was that the cleanup file needed to be named with the version of the module where the cleanup was to be performed. During the installation/upgrade process, the framework would look for the cleanup file that corresponded to the version being installed and remove the specified files. This would occur for each version in the installation or upgrade chain. This means that if you were upgrading from version 01.00.00 to 01.04.00 and there were 01.01.00 and 01.02.00 intermediary steps, the system would look for the corresponding 01.01.00, 01.02.00 and 01.04.00 files and execute the cleanup in order.

For example, the version 04.09.00 cleanup file would be named 04.09.00.txt and looks like this:

' Remove uninstalled module packages that have new versions in distribution.

Install\Module\Forum_03.20.09_Install.resources
Install\Module\HTML_04.06.01_Install.zip

With the new manifest format, a Cleanup Component was created which allows for greater flexibility in identifying the correct files to remove. The old cleanup files are no longer automatically executed and instead you must specify in the manifest the files to be removed.

<component type="Cleanup" version="05.00.00">

<files>
<file>
<path>bin</path>
<name>DotNetNuke.Caching.BroadcastPollingCachingProvider.dll</name>
</file>
</files>
</component>

You can create a component node in the manifest for each version where it is required.

While the old cleanup files are not automatically executed you can still use them by specifying the cleanup file in the cleanup component rather than using the more verbose "files" method.

<component type="Cleanup" version="05.00.00" fileName="05.00.00.txt" />

The filename specified in the component node can be any valid text file and is not constrained to using the version number naming convention.
Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out