Skip to content

[Bug]: Build succeeds even though Errors were raised #8814

@eerhardt

Description

@eerhardt

Issue Description

As part of the dotnet/aspnetcore test build, we are publishing test apps and running them during the build. If the test app doesn't return the correct ExitCode, we fail the build.

However, we've run into situations where raising this Error doesn't fail the build, even though it should. This happens in CI, but we haven't found a case where it happens locally - if the test fails, the build fails locally.

Steps to Reproduce

See the binlog here: aspnetcore-succeeds-buterror.binlog

Here is the MSBuild code raising an error:

https://github.com/dotnet/aspnetcore/blob/81666eef98bd9e8c4d95c1478ebe4d4ba77e61a3/eng/testing/linker/trimmingTests.targets#L121-L125

Expected Behavior

The whole build should fail because an Error occurred during the build.

Actual Behavior

image

Analysis

No response

Versions & Configurations

No response

Metadata

Metadata

Labels

Priority:1Work that is critical for the release, but we could probably ship withoutbugtriaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions