Knowledgebase:
Build fails for no obvious reason
Posted by Yoni Davidson on 18 January 2018 09:58 AM

A build may fail without any real indication if either of the following are true: 

  1. More than one solution configuration is used 
  2. 2 Projects with the same configuration are set to build as a batch build. 

 

Case example : 

The configurations for each of the cases above 

   Batch BuildForm - ConsoleAppIicationI.sIn 
Visual Studio Version 
Solution Confiau rations 
Debug IV'hn 32(2 projects 
(4 pr ojects selected) 
Debuglx64 
ReleaselWin32 
Release Ix64 
(2 projects selected) 
(no projects selected) 
(no ojects selected) 
P roiect Confiaurations 
@ ConsoleAppIicabon I 
ConsoleAppIicaton2 
Save Preset 
Solution Settings... 
Debug IV'hn 
DebuglWin32 
@ Create browse information 
C] Build all regardless of errors 
C] Don't build/dean project dependencie    BatchBuiIdForm - ConsoleAppIicationI.sIn 
Visual Studio Version 
Solution Confiau rations 
(4 pr ojects selected) 
DebuglWin32 
Debug Ix64 
Release 'Win32 
Release Ix64 
(2 projects selected) 
projects selected) 
(no projects selected) 
(no ojects selected) 
P roiect Confiaurations 
@ ConsoleAppIicabon I 
ConsoleAppIicaton2 
Save Preset 
Solution Settings... 
Debug 
Debuglx64 
@ Create browse information 
C] Build all regardless of errors 
Don't build/dean project dependencie

The results:
1.
( 【 」 03 ) •d-VOk 
」 03 ) •d-VOk 
」 03 ) •d-VOk 
ZHO 0 0 - 凹 凵 d 凵 0

2.
Incredi8uiId 
Project 
ConsoleAppIicabon2 - Debug 
ConsoleAppIicaton2-Debug . 
ConsoleAppIicatonI - Debug 
Progress 
Con s LeApp L at 1 
Failed to write to log file 
Studio _ log" _ 
The s s 
the file


In the above example, the build failure is due to the fact that one configuration is an x64 project, it contains one x32 project as well (ConsoleApplication1). This triggers an access violation error which is a legitimate error. However, clicking on the red bar won't show you  this error. Only by looking at the console output or clicking one a project whose progress bar is empty (all white rather than green). 

 

As a workaround, uncheck one of the projects with the same configuration, so there will only be one project for each configuration. Another workaround is to use "BatchBuildParallelExecution2010" property  and set the value to 0, which will execute it as a serial batch build. 

(0 vote(s))
This article was helpful
This article was not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below. This is required to prevent automated registrations and form submissions.

Help Desk Software by Kayako incredibuild.kayako.com