Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article describes the MSB4181 error code.
Message text
MSB4181: The 'value' task returned false but did not log an error.
Description
This error occurs when a task returns false to signal that it didn't complete successfully and also didn't log an error. If you see this error, it means the task failed, but there's no report with specific error information available.
Resolution
First, enable a diagnostic log by using the -verbosity:diag command-line switch, and then check the MSBuild log file with the full diagnostics output. For longer output logs on large projects, consider using the binary log -bl command-line switch with the MSBuild Structured Log Viewer to view the output more easily.
You can also set the MSBuildDebugEngine environment variable to 1 to get all possible logs. For more information, see Building MSBuild for the .NET Framework - Logs.
If the task ran an executable, try running the executable separately with the same inputs and command line.
If you know the owner of the task, consider reporting this issue to the task owner and recommending that they modify the task to log more information.
If it's a custom task and you're the task owner, consider improving the error logging. For example, if an API you're calling might throw an exception, add an exception handler to log the exception message.
Applies to
All versions of MSBuild