In visual Studio, you can Add/Update model/package.
But no option to delete.
I don't see an official method to do the job.
I guess delete specific directory package file or delete the directory specific model file (with deleting the xml file descriptor in package Descriptor directory ) could be the solution.
At this moment deleting a package/model is not supported. To have it deleted, it would be the best to deploy a new environment and don't apply the packages which are not required.
I concur with Andre, there is no right way to uninstall a hotfix package exept for restoring the backup you made before installing the update. Or starting with a fresh machine and re-applying your customisations.
Thank's André and Rik for you reply
We have used ModelUtil.exe to delete models in dev environment.
Usage: ModelUtil.exe -delete -metadatastorepath=[path to metadata store] -modelname=[name of the model to delete]
I agree to 'Mohammad Basheeruddin's response. ModelUtil.exe can be used for the purpose of removing or deleting a model. It is command prompt utility.
C:\AOSService\PackagesLocalDirectory\Bin>ModelUtil.exe -delete -metadatastorepath="C:\AOSService\PackagesLocalDirectory" -modelname="Application suite VAR model" <press Enter>Are you sure you want to delete model Application suite VAR model? (Y/N)y
There are two moments when you would like to remove a model. In development stage and on a live environment. My answer was based on a live environment. Then you cannot use this ModelUtil.exe as Microsoft is only installing deployable packages on the Azure machines.
In the development environment you can delete models, but I wonder if it will really remove build features or only the development objects. Haven't tested this yet.
Yes. Agree with you. In Production environment, LCS team does the deployments so client/partner don't get access to PROD.
I did use it on Development environment and it does delete the model and metadata information from the file system. However, if there are some DB changes (for example, addition of fields in the table or created a new table altogether) and DB synchronization is already complete, then DB changes do not go away with model delete. They persist. Now since extension model is deleted and files don't exist in the system, eventually there is no way the added fields can be deleted unless one has to do hard way (delete from table directly - not recommended).
For model deletion use modelutil.exe delete command and delete the folder after stopping service. then build and sync.
For Package deletion on dev environment , just stop the AOS service, delete the package folder inside the PackagesLocalDirectory , then start service, build and sync.
Hi Guys -
I deleted a custom package but didn't stop the service (not even even sure which service in D365 corresponds to AOS service) later when I try to run the application through VS (after building and syncing it) or access the URL, I get the following error.
HTTP Error 503. The service is unavailable.
I checked the service Microsoft Dynamics 365 for Operations - Batch Management Service was stopped (not sure how) so I started it. Still getting the same error.
Building and synching done successfully without any error?
have you check the application pool?
what you found in event viewer?
Please share some more detail
Did you also create a new question on the forum? Please don't duplicate your posts. This is the link to the new question from Fahad: community.dynamics.com/.../243141.
Hi All - I posted the answer on the orignal thread. community.dynamics.com/.../243141
Assuming that the package should be deleted from UAT/LIVE
1. Delete all the components from package and create deployable package out of it from DEV using VS.
2. Create a text file call “ModuleToRemove.txt” and put it into the AOSService\Scripts folder
3. In the text file, put in the name of the module you want to remove, for example – “MyModule”
4. Zip up the package and upload into the asset library
5. Apply the package in UAT/LIVE.
I see that you are talking about deleting a specific model/package that had been installed. But how about deleting a hotfix that was installed. Coz in the case of hotfix, there is not one clear model/package folder. ALl you know from the "view installed hotfixes" screen is that the hotfix went into ApplicationSuite Package.
Please advise if any of you found a way to do this. And i am talking of non-PROD scenario, so I have access to ModelUtil.exe.
This looks like different question. Can you please ask it as a new one. Also, to tell answer in short you need to have changeset details, when you checked in the HOTFIX changes to VSTS. May be through that changeset you can compare the code and remove the code related to HOTFIX.
ModelUtil.Exe delete method only delete Model file of package. the package is still shown on packagesLocalDirectory folder.
To delete package completely:
1- Stop IIS.(Aos machine)
2- Stop DynamicsAXBatch service on Task manager
3- Delete your package completely located on K:\AosService\packagesLocalDirectory (path can bey vary)
5- Dynamics 365 --> Model management --> Refresh models
Business Applications communities