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

Notification

Icon
Error

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

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

Thanks: 8 times
Was thanked: 8 time(s) in 8 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:

Quote:
<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

Quote:
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 ?

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

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 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
Guest
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.028 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download