Dynamics 365 F&O build from release folder

There is a good documentation of how to set up Azure DevOps and a build environment for continuous build for your Dynamics 365 for Finance and Operations here: https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/perf-test/continuous-build-test-automation

Here the starting situation is that you have a Trunk/Main folder with code like here:

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/perf-test/media/build-trunk-main-metadata.png

Our situation was slightly different. We needed to build from release folder as we are upgrading AX 2012 R3 using the LCS code upgrade tool:

At the end of the automatic code upgrade, we have our code under release folders:

When I copied every file to the Trunk/Main, the build worked. To make it work from the release folders I had to make the following 3+1 changes:

  1. Edit the standard build definition and modify the server path in ’Get sources’ step from ’$/****prod/Trunk/Main’:

In our case it is ’$/****Oprod/Releases/8.1.136.24_U1_2018-10-03T07.57.56’

  • 2. Copy the AXModulesBuild.proj file from Main/Trunk, add it to the release folder and check it in:
  • 3. Modify ’Project’ to point to AXModulesBuild.proj under the new place.

From ’/****prod/Trunk/Main/AXModulesBuild.proj’ we modified to ’$/****Oprod/Releases/8.1.136.24_U1_2018-10-03T07.57.56/AXModulesBuild.proj’

These were all the build modifications. After that I started the build and got a Database synchronization error:

ALTER TABLE WHSDOCUMENTROUTINGLINE ALTER COLUMN PRINTERNAME NVARCHAR(80) NOT NULL;

  UPDATE SQLDICTIONARY SET STRSIZE = 80, RIGHTJUSTIFY = 0, FIELDTYPE = 0 WHERE NAME = ‘PrinterName’ AND TABLEID = 10058; —> System.Data.SqlClient.SqlException: The index ‘I_10058DOCUMENTROUTINGTABLEPRINTERNAMEIDX’ is dependent on column ‘PRINTERNAME’.

  ALTER TABLE ALTER COLUMN PRINTERNAME failed because one or more objects access this column.

The solution was to log in to the build VM and delete the index:

Machine generated alternative text:
Microsoft SQL Server Management Studio (Administrator)
Edit View Debug Tools Window Help
Object Explcru
Connect •
dbc.WHSCROSSDOCKINGTEMPLATESUPPLVSOURCESTAGlNG
dbc.wHSCROSSDOCKLOAOLlNE
dbc.WHSCROSSDOCKOPPORTUNlTY
dbo.WHSCROSSDOCKOPPORTUNlTYPOLlCY
dbc.WHSCROSSDOCKTEMPLATE
dbc.wHSCROSSDOCKTEMPLATESUPPLYSOURCE
dbc.WHscusTOMERGROUPPR00UCTFlLTERSTAGlNG
dbc.WHSCUSTOMERPRODUCTFlLTERSTAGlNG
dbc.WHSCUSTOMWAREHOUSEWORKTYPESTAGING
dbc.wHSCUSTTABLE
dbc.WHscyc:LECOUNTlNGPLANPR00UCTSELECT10NSTAGlNG
dbc.WHSCYCLECOUNTlNGPLANSTAGlNG
dbc.WHSCYCLECOUUTlNGTHRESHOLDSTAGlNG
dbc.WHSCYCLECOUNTPLAN
dbc.WHSCVCLECOUNTPLANOVERVlEW
dbo.WHSCYCLECOUNTPLANPRODUCTSELECT10N
dbc.WHSCYCLECOUUTTHRESHOLD
dbc.wHSDlMTFACKlNG
dbc.WHSDlSPOSITlONTABLE
dbc.WHSDOCKMGMTPROFlLE
dbc.WHSDOCUMENTROUTlNGLAVOUT
dbc.wHSDOCuMENTROUTINGLlNE
CO lumns
Keys
Constraints
Triggers
• Indexes
l_10058RECID (Unique, Non-Clustered)
Statistics
dbc.WHSDOCUMENTROUTlNGPRlNTERLAYOUTSTAGlNG
dbo.WHSDOCUMENTROUTlNGPRINTERSTAGlNG
dbc.WHSDOCUMENTROUTlNGTABLE
dbc.wHSECORESPROOUCTTPAUSPORTATlONCODES
dbc.WHSFlLTERGROUPTA8LE
dbo.WHSFILTERPARM
dbc.WHSFILTERS
dbc.wHSFlLTERTABLE

1 thought on “Dynamics 365 F&O build from release folder”

  1. I have the same problems, but I’m a bit skeptical of your solution. Before I do the same thing, can you please say if you had any further sync problems during deployment on UAT or Prod Environments afterwards? Or did your solution fix it all? Kind regards Katja Breuer

Leave a Reply

Your email address will not be published. Required fields are marked *