[D365] How to update ISV solutions with version control

Often one or more ISV solution can be found in larger projects.
Either if they are bought to solve a specific problem in shorter time or to introduce industry specific functionality, they receive frequent updates and the project team or customer needs to deal with them.

It makes sense to add ISV soltutions to the version control in any case to be able to restore earlier versions in case an update is breaking dependent models or for the purpose to analyse changed behavior.

Dealing with the regular updates in combination with source control (TFVC & git alike) showed some common pitfalls in the past. This was the motivation to write this short manual on how to best deal with ISV updates.

Reading tthe following steps it's important to understand the difference between Packages and Models.

How to update ISV Solutions - without source code available

Runtime only delivery of ISV updates is easy and consists of only the following steps executed on a DEV environment:

  • Install the deployable package(s) via AXUpdateInstaller.exe devinstall
  • Checkin all files and folders of the package(s) including the bin-directories of each model (make sure to check excludede items in checkin dialog if using TFVC)

Distribution via Azure Pipelines will take care of the rest.

How to update ISV Solutions - with source code available

ISV updates with source code available need some more steps and a bit of extra caution to not end up with orphaned objects in source control. Execute the following steps on a DEV environment:

  • Delete the Package folder(s) under AOSService\PackagesLocalDirectory
  • Delete Package(s) from source control (checkin/commit&push these changes) => this step ensures that there are no leftover objects not existing anymore in the new version
  • Install model file(s) via ModelUtil (-replace)
  • Note which folders in each package were created (model folders, Descriptor, possibly additional ones)
  • Open Visual Studio and run Dynamics365 > Model management > Refresh Models
  • Compile the updated models
  • Compile depended models, if any (custom models with references)
  • Checkin the folders not containing runtimes notes in one of the previous steps (model folders, Descriptor, possibly additional ones)

Distribution via Azure Pipelines will take care of the rest.