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:
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:
- 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/220.127.116.11_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/18.104.22.168_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: