Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / Publishing build artif...
Finance forum
Answered

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

Posted on by 75

Hi everyone, 

I am trying to run a pipeline where the source code branch has 2 ISV solutions (deployed as package). When I run the pipeline at the 'Publish artifacts' task it is giving me below error.

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

Though it creates a deployable package, it doesnt create the runtime source zip file which contains the model packages. So i checked for other warnings and in the Build the solution task I see below warnings.

VERBOSE: 6:02:22 AM: - Created metadata provider:
Microsoft.Dynamics.AX.Metadata.Storage.DiskProviders.MetadataDiskProvider
VERBOSE: 6:02:22 AM: - Getting model info from metadata provider and sort it by precedence...
##[warning]EXEC(0,0): Warning : 6:02:22 AM: No models returned by model info provider from metadata path:
##[debug]Processed: ##vso[task.logissue type=Warning;sourcepath=EXEC;linenumber=0;columnnumber=0;code=;]6:02:22 AM: No models returned by model info provider from metadata path:
EXEC : warning : 6:02:22 AM: No models returned by model info provider from metadata path: [C:\DynamicsSDK\VSOAgent\_work\2\s\AXModulesBuild.proj]
C:\DynamicsSDK\VSOAgent\_work\2\s\Metadata
6:02:22 AM: Found 0 packages to build.
##[warning]EXEC(0,0): Warning : 6:02:22 AM: No packages found to create build projects for.
##[debug]Processed: ##vso[task.logissue type=Warning;sourcepath=EXEC;linenumber=0;columnnumber=0;code=;]6:02:22 AM: No packages found to create build projects for.
EXEC : warning : 6:02:22 AM: No packages found to create build projects for. [C:\DynamicsSDK\VSOAgent\_work\2\s\AXModulesBuild.proj]
6:02:22 AM: Generating build projects complete.
I looked for an old community post for the same error which they could resolve the issue by adding the descriptor file to the source control. But as this is an ISV software deployable package deployed in Dev environment via LCS, so there will be no descriptor file (actually it encrypts when you create a software deployable package).
Any suggestions?
Regards,
Avinash
  • YY Lim Profile Picture
    YY Lim 960 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    Glad to hear this and you manage to achieve what you need :)

  • d6community Profile Picture
    d6community 75 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    Hi Yuan,

    Your suggestions made aa lot sense to me in understanding my issue.

    So as there were no models (but has packages) it wasn't able to look for Model related Logs, hence having the AdditionalLogs task doesn't make any sense. I have disabled the task. Thank you for your detail explanation. You have been very helpful. Appreciate your support and insights.

    Regards,

    Avinash

  • YY Lim Profile Picture
    YY Lim 960 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    I hope you manage to resolve this problem with the suggestion?

  • Verified answer
    YY Lim Profile Picture
    YY Lim 960 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    Please disable this step because you have no model to build and hence no log folder created for log upload, or you can create a new custom model in VS, check in the model and descriptor then run the build pipeline again

  • d6community Profile Picture
    d6community 75 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    Yes,  IncludeBinariesInRuntimePackage = 1

    here is the MSBuild argument

    /p:OutputPath="$(Agent.BuildDirectory)\Bin" /p:LogPath="$(Agent.BuildDirectory)\Logs"

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

    failed at Publish artifacts : AdditionalLogs task.

  • Verified answer
    YY Lim Profile Picture
    YY Lim 960 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    Perhaps first thing you could do it branch another branch from Dev to Main first, the package generation should be from your Main (or you can name it to Release up to your preference), so in the future you could have dev customization check in without impacting your release version.

    Back to this one, I haven't use the could hosted vm since the new one released by MS 2 years ago but let me recall, can you check on the variable you have the IncludeBinariesInRuntimePackage = 1? On the build pipeline, there is a second tab variables. 

    I assume the check in structure is correct now, based on what I can see everything is good but you don't have the folder created from build. If you go to the build the solution tab, the MSBuild argument will have the log path /p:OutputPath="$(Agent.BuildDirectory)\Bin" /p:LogPath="$(Agent.BuildDirectory)\Logs", however, you have nothing to publish I think.

    Can you see on the log which steps it failed please? Is it failed on the publish artifact:Packages or Publish artifacts: AddtionalLogs.

    I think if you try this might able to fix the problem, create a new custom model, check in the descriptor then run the build pipeline again

  • d6community Profile Picture
    d6community 75 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    Absolutely. ISV was the package, I installed it on a Dev machine and added the artifacts to the Dev Branch which is under Trunk>Dev>Metedata, projects.

    We are using a cloud hosted build VM, I was able to run the pipeline but with one error and 2 warnings.

    Warning : 6:02:22 AM: No models returned by model info provider from metadata path:

    Warning : 6:02:22 AM: No packages found to create build projects for.

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

    This is a new azure devops project and the ISV was the first thing that is installed in the Dev machine and this would be our first pipeline.

  • YY Lim Profile Picture
    YY Lim 960 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    Sorry, just try to verify this, your ISV provide you the deployable package but not model right? You are checking in the ISV artifacts after you deploy the package to a dev machine and check in to azure devops, not installing model to a dev machine via cmd or power shell. If this case, it is not the code and you will not have model.

    Have a look on your error message again, this one seems using the cloud hosted VM build rather hosted agent right? Is this build has been successfully executed before or this is the first time? Only 2 ISV in the branch and nothing else? I assume your structure is Trunk->Main->Metadata

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

  • d6community Profile Picture
    d6community 75 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    So correct me if I am wrong.

    The error could probably be due to unavailability of descriptor file as the source code only contains ISV packages. If I have any other model with descriptor file in it, the pipeline should run without issue. Is it?

  • YY Lim Profile Picture
    YY Lim 960 on at
    RE: Publishing build artifacts failed with an error: Not found PathtoPublish: C:\DynamicsSDK\VSOAgent\_work\2\a\Logs

    Sorry, perhaps I misunderstood your question earlier, it seems your branch has only 2 ISV checked in code, you could create one dummy model with descriptor to build, when the package it build, it will copy all the installed artifacts.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,696 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,490 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans