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.

  • g.verbruggen Profile Picture
    23 on at
    RE: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

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

  • Frank Moe Profile Picture
    5 on at
    RE: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

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

  • Gareth Thorpe Profile Picture
    2 on at
    RE: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

    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.

  • d6community Profile Picture
    79 on at
    RE: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

    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
    RE: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

    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

  • André Arnaud de Calavon Profile Picture
    293,245 Super User 2025 Season 1 on at
    RE: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

    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.

  • d6community Profile Picture
    79 on at
    RE: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

    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

  • Alex VN Profile Picture
    1,994 on at
    RE: Could not access to metadata directory 'C:\AOSService\PackagesLocalDirectory' in package deployment via LCS

    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,

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,927 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans