Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×I have the following PostBuild configuration in my project file to copy some libraries into my output directory:
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="copy $(ProjectDir)Lib\* $(OutDir)" />
</Target>
This works as expected on my dev machine, but I get the following build error in Pipelines:
error MSB3073: The command "copy /opt/atlassian/pipelines/agent/build/<PROJECT>/Lib/* bin/Debug/netcoreapp2.2/" exited with code 127.
Is there any way I can get this to work?
I realized the issue was due to the fact Pipelines runs on Linux and my dev machine was windows. The "copy" command is windows specific, so to fix the issue I changed the PostBuild event to use "cp" instead:
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="cp $(ProjectDir)Lib\* $(ProjectDir)$(OutDir)" />
</Target>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.