Hello everyone,
Can anyone help me solve a problem that has arisen during the update of the cross-reference in Dynamics AX 2012. After running the script
static void CrossRefUpdateBatch(Args _args) { ; xRefUpdate::truncateXrefTables(); xRefUpdateIL::updateAllXref(true, false, true); info("Done, cross reference update batch job created."); }, the following errors have occurred:
- Unable to generate cross reference information for assembly: Microsoft.Dynamics.Ax.Tms.dll
- Unable to generate cross reference information for assembly: Microsoft.Dynamics.AX.Framework.Tools.CodeUpgradeTool.Parser.dll
- Unable to generate cross reference information for assembly: Microsoft.ApplicationInsights.dll
- Unable to generate cross reference information for assembly: Microsoft.Dynamics365.XppSupportLayer.dll
The error occurs on line 107 in the script (\Classes\xRefAssemblyReferences\updateXrefAssembly)
////// Identifies references to AOT elements from an assembly that is registered under AOT References. /// /// /// A tree node for the assembly to inspect. /// /// /// The name of the assembly to do cross reference over. /// /// /// The path where the assembly is located. /// /// /// Boolean whether the assembly can stay loaded after cross reference is ran over. /// Example: VS Projects need the assembly to be unloaded to be updatable if code changes are made. /// public static void updateXrefAssembly(TreeNode _treeNode, str _assemblyName, str _assemblyPath, boolean _loaded = true) { Microsoft.Dynamics.AX.Framework.CrossReference.ReflectorHost reflectorHost; Microsoft.Dynamics.AX.Framework.CrossReference.Reflector reflector; Microsoft.Dynamics.AX.Framework.CrossReference.Reference reference; str referedElementName; int xrefReferedElementType; int operationType; int line; int column; int parentType; int parentId; str parentName; str source; boolean moreReferences; int numberOfReferencesFound; try { //If the assembly is not loaded - Create AppDomain to be able to unload assembly after cross reference performed. if (!_loaded) { //BP Deviation Documented reflectorHost = new Microsoft.Dynamics.AX.Framework.CrossReference.ReflectorHost(); //Create the reflector object through host passing in the client bin path reflector = reflectorHost.startDomain(); } else { //BP Deviation Documented reflector = new Microsoft.Dynamics.AX.Framework.CrossReference.Reflector(); } // Identify the list of references reflector.findReferences(_assemblyPath _assemblyName); numberOfReferencesFound = reflector.numberOfReferences(); // Store the references if(numberOfReferencesFound > 0) { do { reference = reflector.nextReference(); reference.getValues(byref referedElementName, byref xrefReferedElementType, byref operationType, byref line, byref column, byref parentType, byref parentName, byref source); switch(parentType) { case UtilElementType::Table: parentId = tablename2id(parentName); break; case UtilElementType::Class: parentId = classname2id(parentName); break; case UtilElementType::Enum: parentId = enumname2id(parentName); break; } _treeNode.AOTaddXref(referedElementName, xrefReferedElementType, line, column, operationType, parentId); moreReferences = reflector.more(); } while(moreReferences); _treeNode.AOTendXref(); } // Unload AppDomain. This will unlock any assemblys loaded during xRef. if(!_loaded) { reflectorHost.unloadDomain(); } } catch { if(!_loaded) { reflectorHost.unloadDomain(); } error(strfmt("@SYS320347",_assemblyName)); } }
Can anyone help me get rid of these errors and explain why they are occurring?
Thank you in advance for your help!