AOT packages can be packaged into a MS D365 F&O Deployable Packages, which is the vehicle used for deployment of code on demo, sandbox and production environments. This article guides you through the process of creating and applying a deployable package.
An AOT package is a deployment and compilation unit of one or more models that can be applied to a MS Dynamics 365 for Finance and Operations environment, or a Microsoft D365 for Retail environment. It includes model metadata, binaries, reports and other associated resources.
MS D365 F&O Deployable Packages Process Overview
In order to deploy your code and customizations to a runtime environment, you must create deployable packages of your solution or implementation. The packages can be created using the Visual Studio dev tools, or by the build automation process that are available on build environments.
These deployable packages are referred to as Application Deployable Packages or AOT Deployable Packages. The image below is an overview of the process. After a deployable package is created, it should be uploaded to the LCS projects asset library. An administrator can then go to the LCS environment page and apply the package to a runtime environment using the Maintain > Apply updates tool.
MS Dynamics 365 Finance and Operations Deployable Packages Creation
It is recommend that using a build environment to create deployable packages is feasible. You can also create a deployable package on a development environment.
On a development environment, after you have completed development and testing, follow these steps to create a deployable package in Visual Studio.
- In Microsoft Visual Studio, choose Dynamics 365 > Deploy > Create Deployment Package.
- Select the packages that contain your models, and then select a location in which to create the deployable package.
- After a deployable package is created, sign in to Microsoft Dynamics Lifecycle Services (LCS), and then, in your LCS project, click the Asset Library tile.
- Upload the deployable package that you created earlier.
Uninstall a Package
Occasionally, you might have to uninstall a deployable package. For example, you might be reorganizing your source code. Alternatively, you no longer require an independent software vendor (ISV) product and haven’t renewed the license. Therefore, you must remove the package.
- If any models reference the module that will be removed, the references must be removed from them.
- Build and deploy any modules that references were removed from.
- All the references to and from the modules must be deleted before you begin to uninstall the module. To delete all a modules references, add a single class to the model. This class should contain no code. It should consist of only a reference to the application platform.
Uninstall a Package
- Create a file that is named ModuleToRemove.txt.
- In the file, put the name of each module that you want to remove on a separate line. Make sure that you have completed the prerequisites for each module that you are removing.
- Create a valid deployable package, and put the ModuleToRemove.txt file in the package\AOSService\Scripts folder.
- Install the deployable package.
- Verify that the package was uninstalled before you complete this procedure in a production environment.
A model is a design-time concept that is part of a package. When a model is not the only model in a module, you can just remove it from the source code. No other steps are required, since when you deploy the updated module, the old module is overwritten. All overlayer models fall into this category. For more information on MS D365 F&O Deployable Packages, please contact us.