Wednesday, August 30, 2017

Manually Add the Descriptor

Another task on this project had me update a label in the middle of a very large method that is called from 49 other places in D365.  Between changing 50 places in code as a set of derived classes and extensions or just customize the sys layer, I opted for the latter.  So, I created a customization project in a new model under ApplicationSuite.  The change took a few minutes.  I had to create new label files, write the labels, change the line of code.  I checked everything into VSTS correctly.  Then, a colleague did a test build and we found out that the new model that I created did not get registered by D365.  As a result, it could not be built from the Dynamics 365 menu.

A first pass at trying this had me export the project and emailing him the file.  My colleague then imported the file.  Then we found that the model was correctly created.  However, this did not seem like the right solution.

Contacting another colleague led me to the right solution.  Apparently, each model has a summary xml file under the Descriptor directory for the main model.  Customization models will have a file in the Descriptor folder of the model being customized (e.g. ApplicationSuite).  Extension models will have a Descriptor folder under the root (e.g. <<AosService>>\\PackagesLocalDirectory\<<Model Name>>.  In either case, the file for the descriptor needs to be manually added to VSTS.

Once a build machine gets the latest, the new model should be added.


No comments:

Post a Comment