web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Build VM - Service update PU42 LCS package deployment failure

(0) ShareShare
ReportReport
Posted on by 15

Hello All,

I'm trying to apply 10.0.18 service update to build server from LCS. Package deployment fails with either DB Sync error, module reference error or other compilation errors. I believe LCS is ignoring some of the new check-ins during code compilation and DB sync during service update package deployment. 

However, I don't see these errors when I compile the code and sync the DB manually on the build server. Are there any additional steps that needs to be followed while applying service update to build VM?

I don't see packages folder in J:\DynamicsBackup folder for some reason. Are there any other folders/cache that needs to be cleaned up for LCS to consider latest code?

I have the same question (0)
  • Suggested answer
    Joris dG Profile Picture
    17,775 on at
    RE: Build VM - Service update PU42 LCS package deployment failure

    So to pile on / rephrase what Nikolaos and Martin have said...

    The build VM is INTENDED to not have your custom code during an update. So if you put the code back there - you are in a BAD STATE as now your backup will contain your custom code. This is bad because every build you perform it will put old code back.

    Please ensure that your dynamicsbackup has NO ISV and NO CUSTOM CODE. I can guarantee we will be talking to you through support if you leave it there.

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: Build VM - Service update PU42 LCS package deployment failure

    The backup of the packages folder should always contain only the standard application, not any custom objects. It's the baseline that the build restores before each build. Then it gets latest code from ADO and builds it.

    If you had custom objects in the backup, it implies that you have done some development (or manually getting latest) in the server. This should never be done, it causes issues like the one that you're having. Build server should be used for builds that are triggered from ADO, and for nothing else.

    This issue can be solved by deleting the bad backup of packagesLocalDirectory, or deploying a new build VM. 

  • Martin Dráb Profile Picture
    235,876 Most Valuable Professional on at
    RE: Build VM - Service update PU42 LCS package deployment failure

    Yes, that's what I'm talking about. You shouldn't have any there - a build should start with a clean environment, not with an old version of your code. Your problems are caused by that.

  • Praveen Rachakonda Profile Picture
    15 on at
    RE: Build VM - Service update PU42 LCS package deployment failure

    Thanks Martin. Custom code I'm referring to is the code from DevOps. For some reason, not all ISV/custom objects were getting sync'ed from DevOps to PackagesLocalDir folder.

  • Martin Dráb Profile Picture
    235,876 Most Valuable Professional on at
    RE: Build VM - Service update PU42 LCS package deployment failure

    You shuoldn't have any custom code on a build server. When a build starts, a clean codebase (without any customization) should be copied from the backup and all customizations should be downloaded from Azure DevOps. That should be the only source of customizations.

    Please either deploy a new environment or delete the backup and all custom models (your code and ISV solutions) from the PackagesLocalDir. And don't download anything from Azure DevOps.

    Obviously your problem with compiling custom code on update will also disappear when you start using the environment in the right way.

  • Praveen Rachakonda Profile Picture
    15 on at
    RE: Build VM - Service update PU42 LCS package deployment failure

    Thanks Nikolaos. Service update succeeded after few attempts. I'm not exactly sure what the root cause was.

    Compilation errors were related to ISV and/or custom models/packages. It says specific objects were missing where as those objects already exist in DevOps. When I manually compiled and performed DB sync on build VM, I didn't find any issues.

    During package deployment, LCS is copying old backup of metadata from elsewhere to AOSService/PackagesLocalDir folder. This back up is missing few latest ISV/custom objects which are already checked-in to DevOps and existed in AOSService/PackagesLocalDir folder. I got latest version from TFS every time before I try to deploy service update package from LCS.

    I believe these latest objects are missing when old backup is copied to AOSService/PackagesLocalDir. All I did was to delete custom/ISV folders from AOSService/PackagesLocalDir folder, got latest every time from TFS and kicked-off package deployment from LCS. It finally succeeded.  

  • nmaenpaa Profile Picture
    101,160 Moderator on at
    RE: D365 Finance and Operations build VM - Service update PU42 LCS package deployment failure

    When you apply packages from LCS, no compilation is happening. So I'm not sure what you mean when you say that the package deployment fails with "other compilation errors", or that "LCS is ignoring check-ins during code compilation". 

    I think you need to analyze in more detail what exactly fails and what the errors are. Then please share that info with us if you need help.

    When you update your build server to new D365 version, the old backup of AOSService/PackagesLocalDirectory will be wiped out. And when you build for the first time after the update, a new backup will be taken.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 745 User Group Leader

#2
Martin Dráb Profile Picture

Martin Dráb 597 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 580 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans