question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Which task failed the build?

See original GitHub issue

In this binlog, the build failed, but no task emitted an error message. Is there a quick search I can do in the structured log viewer to find which task returned false, causing a build failure?

test_net472 (1).zip

image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
KirillOsenkovcommented, Jul 1, 2021

In a normal case, MSBuild will log an error when a task failed, but didn’t log an error. So it would be obvious (the task with an error underneath).

But if someone uses Reflection to turn off this safeguard in MSBuild, then all bets are off. I doubt we should do anything here other than work with folks to remove their reflection hacks.

Of course we could log the task return value (true/false) and then allow searching for tasks that returned false, but that’s almost equivalent to what MSBuild is already doing with AllowFailureWithoutError.

I did file an issue against MSBuild here: https://github.com/dotnet/msbuild/issues/6633

They should still at least log a message if not an error/warning, if the task failed but didn’t log an error and AllowFailureWithoutError was set to true. That way one could simply search for that message to see where it was logged.

Let me know if you do feel we should implement something additional to what I mention above. I’m not against it, just questioning whether it’ll be worth it given the circumstances.

0reactions
KirillOsenkovcommented, Aug 20, 2021

Closing since it’s not a viewer bug.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Diagnosing task failures - MSBuild
Learn how to diagnose MSBuild task failures by identifying the failing task, tool name, and other information.
Read more >
Azure Pipeline skip failed task and ignore fail in build process
I have a task inside an Azure Pipeline Job which is failing. In my case the fail of the task isn't important so...
Read more >
Visual Studio Build task fails in Azure DevOps - my .Net ...
I am seeing an issue when building in Azure DevOps on my own build VM. Same error occurs on a VS2017 hosted agent....
Read more >
Fail the build when a task fails - Plugin Portal
Hi,. We have created a gradle plugin which contains a simple task to check project structure and throw an exception if it doesn't...
Read more >
MSBuild Task doesn't fail the build on build failure in ...
I have set an additional argument in the MSbuild task - /WarnasError . Now, this works properly and fails the entire build when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found