Few times we came across the issue of failing of D365 apply updates or package deployment failed at the step of DevTools.
To resolve the issue follow below steps:
- Download the package if not downloaded
- Unblock the downloaded package Zip file before extracting
- Extract the the package zip file
- Navigate to the DevToolsService/Scripts folder in the extracted package folder
- Find the the file Microsoft.Dynamics.Framework.Tools.Installer
- Double click on the file and install the extension for VS2019
- Once extension installation complete resume the package deployment.
Please feel free to comment if you’re facing any issue. We will try our best to help you solve the issues.
To set default model for new projects in visual studio update the below configuration with your model name
C:\Users\user account\Documents\Visual Studio Dynamics 365
Edit the file in the notepad and search for default model for new projects node
Replace the model name in this case it “Fleet management” with your model name
Scenario: Sometime we need to uninstall a deployable package from the UAT or Production environment.
Below are the steps that need to be performed to uninstall a package.
- Create a deployable package using visual studio or Build server
- Do not extract the deployable package that is in ZIP folder (If you extract the zip folder you will face issue invalid HotfixInstallationInfo.xml file)
- Just open the deployable package zip folder
- Go to Deployable package zip folder -> AOS service -> Scripts folder
- create a text file name ‘ModuleToRemove’
- Write the module name to be removed in the the ModuleToRemove file
- If you have multiple models to remove then write mode name per line as below
- Note: In multiple models removing write the models name in sequence as per dependency sequence
- Go back to main zip folder and find the file HotfixInstallationInfo.xml ,copy the file to some other location and edit the file like below
- Edit the file should be same as above.
- Copy and replace the HotfixInstallationInfo.xml file in the deployable folder
- upload the file in the asset library and apply the package to the UAT environment first if applied successfully then apply to the production environment.
Please leave comments if you are facing any issue.
Sometimes we need to delete the model and deployable package from the dev environments.
use Modelutil.exe to delete the model file from the packages local directory.
Package installation or deletion:
- Stop IIS (kill the IIS worker process from the task manager)
- Stop batch job DynamicsAXBatch job
- Delete the package folder located on C:\ or K:\AosService\PackagesLocalDirectory (make sure folder completely deleted)
- Open VS Dynamics -> Model Management -> Refresh models
Export model from one dev environment to another dev enviornment
Steps to perform:
- Export model from enviornment using command prompt
- Import Model in another enviornment using command prompt
- Resolve conflicts
- Complete build of models and Synchonization of Database
Export the model using utilily name ModelUtil.exe located in the below path
K:\ Drive can be varrried for local VM C:\ or J:\
ModelUtil.exe -export -metadatastorepath= [path of the metadata
store] -modelname=[name of the model to export] -outputpath=[path
of folder where model file should be saved]
ModelUtil.exe -export -metadatastorepath= K:\AosService\PackagesLocalDirectory -modelname=D365FnOModel -outputpath=C:\Users\Userf3d496631\Desktop\US\devmodelsbackup
To install or import a model file use below code
ModelUtil.exe -import -metadatastorepath=[path of the metadata store
where model should be imported] -file=[full path of the file to
ModelUtil.exe -Import -metadatastorepath= K:\AosService\PackagesLocalDirectory -file=C:\Users\Userf3d46296631\Desktop\US\devmodelsbackup\D365FnOModel
Delete a Model:
If model already exists in the destination environment. Delete the model using modelutility.exe
ModelUtil.exe -delete -metadatastorepath=[path of the metadata store]
-modelname=[name of the model to delete]
ModelUtil.exe -Delete -metadatastorepath= K:\AosService\PackagesLocalDirectory -modelName=D365FnOModel
Resolve the conflicts after importing:
Build and sycnhronize:
after resolving all the conlicts build the model(all models would be better but it will take long time) and synchronize the database