Visual studio 2013 "A task was cancelled"

C++Visual Studio-2013MsbuildVisual Studio-2015

C++ Problem Overview


After installing VS 2013 (Update 3) on windows 7 SP1 I have similar situation like in this post After installing windows 8.1 sdk visual studio cant build any win32 project and print output :

1>----— Build started: Project: ConsoleApplication1, Configuration: Debug Win32 —----
1>A task was canceled.
1>A task was canceled.
========= Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

C++ Solutions


Solution 1 - C++

Just to be complete,

Closing and reopening Visual Studio worked for me after I had changed the time zone and was getting the same errors as you.

Solution 2 - C++

I encountered the same error when I installed VS2013 update 5. During the installation my VS was open. Prior to installation of the update, I was asked to close VS but I neglected. That might have been the reason for the error although not sure about the exact cause.

After installation, the installer prompted me to restart the computer and the error was gone after I restarted my computer.

Solution 3 - C++

I am encountering similar problem with VS2015 update 3. Once this start happening I can't build application and can't start another instance Visual studio as it gives out of memory exception.

After looking through task lists I found out that there are many instance of conhost.exe and MSBuild.exe processes. So as temporary fix I kill all instances and try again building it is not perfect solution but works some times.

You can try run following batch commands.

Taskkill /IM MSBuild.exe /F
Taskkill /IM conhost.exe /F

Solution 4 - C++

Changed the time zone of system (Start>Settings>Time&language>Date&time>Time zone) to automatic, and then restarted the VS2019(on this I was facing the issue) in administrator mode. Issue got resolved for me.

Solution 5 - C++

I had the "A task was cancelled" error, not after updating Visual Studio or changing the time clock, but when enabled editing to a file from my version control software.

Likewise, reloading Visual Studio fixed the error.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionFunctorPrototypeView Question on Stackoverflow
Solution 1 - C++hubatishView Answer on Stackoverflow
Solution 2 - C++RuchirView Answer on Stackoverflow
Solution 3 - C++Rohan DView Answer on Stackoverflow
Solution 4 - C++ShreyansView Answer on Stackoverflow
Solution 5 - C++NaBUru38View Answer on Stackoverflow