Fixing the ‘The selected package is missing the following modules’ Error in Dynamics 365 F&O

Fixing the ‘The selected package is missing the following modules’ Error in Dynamics 365 F&O

Deploying a package to a Dynamics 365 Finance & Operations environment should be routine, but what if your deployment fails with a missing module error?

Article content

The selected package is missing the following modules that are currently deployed on your environment. You must create an all-in-one deployable package that contains all your code customizations and ISV solutions. More information can be found at the following link: https://go.microsoft.com/fwlink/?linkid=2118104. Missing module(s): [missingModule1] [missingModule2]


Why This Error Happens?

This error typically occurs when modules previously installed, often related to Independent Software Vendor (ISV) solutions, are not included in the current deployable package. If you’ve recently removed or altered ISVs or other customizations, the system expects them to still be part of the deployment unless explicitly uninstalled.


How to Fix It Using ModuleToRemove.txt

Step-by-Step Solution

To fix this issue, you need to uninstall the missing modules explicitly. Here’s how you can do it:

1️⃣ Create ModuleToRemove.txt

  • Open Notepad or any plain text editor.
  • Add each missing module name on a separate line: missingModule1 missingModule2
  • Save the file as ModuleToRemove.txt.

Article content

The ModuleToRemove.txt acts as a signal to remove the specified modules during the deployment, allowing the process to complete without errors.

2️⃣ Prepare the Deployable Package

  • Create a deployable package as usual.
  • Place your ModuleToRemove.txt into the following directory within your package: package\AOSService\Scripts

3️⃣ Upload the Package to Lifecycle Services (LCS)

  • Go to your LCS portal.
  • Upload your deployable package to the Asset Library.
  • Wait until validation completes and address any warnings shown.

4️⃣ Deploy the Package

Apply the deployable package to your environment through the LCS portal:

  • Navigate to your environment.
  • Select “Maintain” → “Apply updates”.
  • Choose your deployable package and proceed with deployment.

5️⃣ Verify Uninstallation

  • Ensure the modules have been successfully removed and verify in the environment that modules no longer appear.


Put It into Play

Following these steps will resolve the “missing modules” error swiftly. Properly managing your modules and understanding the deployment process in D365 F&O ensures smooth operations and fewer disruptions.

Encountered similar issues or have more tips? Share your experience in the comments!


Links

Florian Hopfner

Development Solution Architect bei Inway Systems GmbH

3w

If you want to streamline steps 1+2, take a look at New-D365ModuleToRemove and Add-D365ModuleToRemove https://github.com/d365collaborative/d365fo.tools/wiki/New-D365ModuleToRemove#example-2

To view or add a comment, sign in

Others also viewed

Explore topics