Wednesday, December 11, 2019

Uninstall package from deployable package in D365FO


  • Take zip file of the deployable package that needs to be removed and unzip it (C:\Users\Administrator\Desktop\eployablePackage)
  • Navigate to C:\Users\Administrator\Desktop\DeployablePackage\AXDeployablePackage_20191212_11_13_50\AOSService\Scripts folder
    • Create a text file called ModuleToRemove.txt,
    • Enter the package you like to remove from the deployable package
    • If you have multiple packages, enter the package name one by one (one package name per one line)

  • Navigate to C:\Users\Administrator\Desktop\DeployablePackage\AXDeployablePackage_20191212_11_13_50\AOSService\Packages folder
    • Delete the .nupkg files from this folder
    • dynamicsax-mypackage1.7.0.5372.35448.nupkg
    • dynamicsax-mypackage2.7.0.5372.35448.nupkg
  • Navigate to C:\Users\Administrator\Desktop\DeployablePackage\AXDeployablePackage_20191212_11_13_50\AOSService\Packages\files folder

    • In this folder each package one zip file will be created
    • Delete the package zip file which one you want to remove
  • In the root deployable package directory, modify the HotfixInstallationInfo.xml file to remove references to the modules you are removing,
  • specifically under the following XML tags:
    • MetadataModuleList
    • AllComponentList -> ArrayOfString
  • After modification the file will be look like this
  • Rezip the deployable package, upload it to LCS in the asset library, and deploy it like you would any other deployable package
Prerequisites
  • If any models reference the module that will be removed, the references must be removed from them. For information about how to find the references that must be removed, see Viewing model dependencies.
  • Build and deploy any modules that references were removed from.
  • All references to and from the modules must be removed before you begin to uninstall the module. To remove all a module's references, add a single class to the model. This class should contain no code. It should contain only a reference to the application platform.
Notes
  • Deployable packages only reference the platform build within the metadata, so you only need to build one package per platform version
  • Be sure to not change the folder structure when you are unzipping or rezipping the deployable package, this will cause the validation process to fail when uploading it back into LCS

No comments:

Post a Comment