Welcome Guest! To enable all features please Login or Register.



Post Build Event exitcode 3
Dirk Maegh
#1 Posted : Thursday, February 13, 2020 12:03:47 PM(UTC)
Rank: Member

Groups: Registered
Joined: 11/30/2016(UTC)
Posts: 14
Location: Belgium

Thanks: 2 times
Was thanked: 2 time(s) in 2 post(s)
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)" />

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/d...ng_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 ?

#2 Posted : Thursday, February 13, 2020 10:17:56 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,117

Thanks: 794 times
Was thanked: 1043 time(s) in 993 post(s)
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'">
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.029 seconds.