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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

(0) ShareShare
ReportReport
Posted on by 79

Hi Team,

I am trying to deploy a package that is generated via the build pipelines. The env that I am deploying is a cloud hosted env and when trying to deploy the package via LCS>Maintain, it is failing at Step 12 (during the db sync) giving below errors. 

Microsoft.Dynamics.AX.Metadata.Storage.MetadataReadRootDirectoryAccessException: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory'. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\AOSService\PackagesLocalDirectory'.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.DirectoryInfo.EnumerateDirectories()

I dont know what it is trying to look for the AOS directory under C: drive. Is this known to anyone? Please help. 

Running both build and test env on 10.0.25.

I have the same question (0)
  • Alex VN Profile Picture
    1,994 on at

    Hi,

    I'm not sure if there is any issue with the generated packages but normally for couldhosted we will have AOSService folder in K drive instead of C drive. May be some setup is misconfigured or a bug maybe?

    If you want I think you can try to analyze the package content and change the place of the error to use K drive instead and resume the operation.

    Regards,

  • d6community Profile Picture
    79 on at

    Thank you for your response Alex.

    I verified each and every task of the build pipeline from a working pipeline of a different project. Every task is just the same. I do not see any difference in the build configuration. I tried to look the package content but was unable to get to that part of file which holds the AOS paths. Any idea what package content I should be looking for?

    Thanks

    Avinash

  • André Arnaud de Calavon Profile Picture
    300,904 Super User 2025 Season 2 on at

    Hi Avinash,

    I haven't seen this issue myself before. Are you able to use the deployable package on another VM or do you then get the same error? Did you also try to install another deployable package on the environment which is giving the error? Then you are able to determine if it is related to the package, the target environment.

  • Gareth Thorpe Profile Picture
    2 on at

    Hi, did you find a solution to this issue?

    We are seeing the same thing deploying an update via LCS to a cloud hosted tier 1 on 10.026.

    The package has deployed fine onto other environments all on the same version, but we see this issue on one particular one.

    I'm not sure where this is getting the c:\ drive especially as further up in the log it's showing

    Bindir: K:\AosService\PackagesLocalDirectory

    MetadataDir: K:\AosService\PackagesLocalDirectory

  • d6community Profile Picture
    79 on at

    Hi, 

    I deleted the solution folders from source control. Deleted the solution from my Dev, redeployed and added them back to source control and re-run the pipeline. It went through the previous error of looking for AOS in C drive but I encountered a new error below.

    ##[error]Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    I opened a new microsoft ticket and they were also able to replicate this issue but have no resolution yet. The ticket is open since 3 weeks now. 

  • Gareth Thorpe Profile Picture
    2 on at

    Thanks,

    I think I've managed to resolve our issue.

    I searched through K:\AosService for files containing C:\AosService\PackagesLocalDirectory.

    Apart from the log xml files one file came up as containing this reference

    K:\AosService\WebRoot\Bin\Microsoft.Dynamics.AX.Deployment.Setup.exe.config

    I replaced this file with a copy from an alternative server which updated without issue.

    When I resumed the update in LCS it completed without error.

  • Frank Moe Profile Picture
    5 on at

    thx for the tip, I just removed the lines refering to Retail, saved the file and resumed in LCS, worked fine

  • g.verbruggen Profile Picture
    23 on at

    Thanks Gareth. Same issue here on V29. Solved by the steps you mentioned.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 660 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 307 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans