Monday 9 February 2015

Phantom objects in USR layer after compile using AXBuild

Recently we performed a cleanup of USR layer and moved the objects (created wrongly in that layer) to CUS layer or removed them if they were not required as we are supposed to have nothing in USR layer. We then removed the USR model using AXUtil. This went well until we noticed that there are some objects in USR layer. These included some classes and forms. Recompiling was bringing these objects back even if we remove these.

Examining these objects, we found that none of these have any difference from the layer below. These phantom objects were created while the application was compiled using AXBuild. A client compile was not creating these phantom objects.

So we contacted MS and were advised to apply KB 3015739 which is a binary hotfix. This however did not fix our issue. One of my colleague later discovered that if we pass an additional un-documented parameter /layer=cus to AXBuild, these phantom objects are not created.

Not sure if this parameter was present before or it was introduced due to the KB that we applied but it fixed out issue.

We are on AX2012 R2 with CU7.

This posting is provided "AS IS" with no warranties. Use code at your own risk.

2 comments:

  1. Hi, as far is i understand instead appearing in USR these phantom objects now appear in CUS right?
    br Beat

    ReplyDelete
  2. Hi Beat, For us these always appeared in the USR layer.

    ReplyDelete