Build/Test Issues

Post Build Event exitcode 3

Started by Dirk Maegh on 3,111 views

Hi there,

I recently started working at a new client, and let ncrunch have a go at one of the solutions.
It fails building several projects, and I suppose these reference each other, so one build failure triggers others.

So I started looking at one particular project, called the framework.

In the project file I found the following entry:

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Exec Command="if $(ConfigurationName) == Debug $(SolutionDir)Templates\PostBuildEventsCopyToPackagesClient.bat $(ConfigurationName) $(TargetName) $(TargetFramework) $(SolutionDir) $(TargetDir)" />
</Target>


In the NCrunch output, I found

NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/documentation/troubleshooting_project-build-issues
The command "if Debug == Debug C:\Users\dirk_\AppData\Local\NCrunch\952\10\Templates\PostBuildEventsCopyToPackagesClient.bat Debug AgilitasGroup.Framework net472 C:\Users\dirk_\AppData\Local\NCrunch\952\10\ C:\Users\dirk_\AppData\Local\NCrunch\952\10\AgilitasGroup.Framework\bin\Debug\net472\" exited with code 3.


I checked the suggested url. I read that ncrunch by default does not run the postbuild events, while the error code seems to stem from this postbuild event.
I have a pristine configuration for the solution, so the "Run post-build events" still has an effective value of false.

It is a +70 project solution, with multiple internal paket packages, so no easy access to that.
What information can I give you to give me the best advise in solving this issue please ?

Thx,
Dirk
Hi Dirk,

Thanks for sharing this issue.

The 'Run post-build events' configuration setting can be a little misleading, and we've recently updated the documentation to reflect this. Basically, this setting only control build events that are specified using the MSBuild Properties. It will not suppress custom build steps defined using custom targets (such as yours).

To resolve this problem, you'll need to make the target conditional instead, for example:

<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(NCrunch)' != '1'">

Post a reply

Log in to reply.