Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2012 Build Output: A task was canceled

My team has a virtual machine running Windows Server 2008 R2 Enterprise, SP1 that we use for running our nightly build. We are using Visual Studio 2012 and launching the build process by running devenv.exe via System.Diagnostics.Process.Start from a C# program.

Recently we have been getting build failures, and the output log will look like

26>------ Build started: Project: PrjX, Configuration: Release Win32 ------  
26>A task was canceled.  
27>------ Build started: Project: PrjY, Configuration: Release Win32 ------  
27>A task was canceled.  
28>------ Build started: Project: PrjZ, Configuration: Release Win32 ------  
28>A task was canceled.  

Sometimes it might be only one or two projects, other times over 100. FWIW, we build three solutions, and the first one is failing. The two that follow get built correctly.

From looking for information on the issue, I know that the output is due to exception System.Threading.Tasks.TaskCanceledException being caught somewhere in VS 2012. Other than that, I have no clue as to what is going on. My suspicion is it might have something to do with parallel project builds. So far, I have only seen one other post related to this issue - http://social.msdn.microsoft.com/Forums/en-US/306f5a10-db72-4992-9d49-20ad1577ed05/visual-studio-2013-error-a-task-was-canceled?forum=visualstudiogeneral The "answer" was really not an answer....

Any help or insight would be appreciated.

like image 240
GTAE86 Avatar asked Mar 27 '14 14:03

GTAE86


1 Answers

Restarting your VS will solve the problem!

like image 75
Bhupesh Pant Avatar answered Oct 06 '22 22:10

Bhupesh Pant