-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
Milestone
Description
Description
When publishing an app for AOT, and TreatWarningsAsErrors=true, if there are trim/AOT warnings, the publish doesn't fail as errors.
However, when I <PublishTrimmed>true</PublishTrimmed> the same app (with the same trimming warnings), the publish fails.
We should be consistent in our behavior between these 2 publish operations and TreatWarningsAsErrors.
Reproduction Steps
In your .csproj:
<PublishAot>true</PublishAot>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>And have trim warnings in your app.
Expected behavior
The publish should fail because I have warnings and TreatWarningsAsErrors=true.
Actual behavior
The trim/AOT warnings are emitted as warnings, but these warnings were not treated as errors, and my publish succeeds.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status