You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
.NET 7 RC 1 how to show a warning from a linker step? #2982
And I believe this change made our warning disappear in projects by default: 82c6dc6
You can probably enable this warning with $(SuppressTrimAnalysisWarnings) set to false, but is there a way to make a warning always appear? Maybe we lost a way to do that?
The assumption behind that change was that we could treat all warnings produced by the linker as belonging to the "trim analysis" category - but maybe we need a different concept to handle this if the Xamarin warnings should be shown even with SuppressTrimAnalysisWarnings. Do you think users would expect that warning to show up if they specified <SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>?
In the meantime, if you need a workaround, you could try the following:
when SuppressTrimAnalysisWarnings is true:
set ILLinkWarningLevel to 4
this will still prevent the built-in warnings from showing since they all have a version 5
where you produce the custom warnings, pass in (WarnVersion) 4
Activity
sbomer commentedon Aug 18, 2022
The assumption behind that change was that we could treat all warnings produced by the linker as belonging to the "trim analysis" category - but maybe we need a different concept to handle this if the Xamarin warnings should be shown even with
SuppressTrimAnalysisWarnings. Do you think users would expect that warning to show up if they specified<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>?In the meantime, if you need a workaround, you could try the following:
SuppressTrimAnalysisWarningsis true:ILLinkWarningLevelto4this will still prevent the built-in warnings from showing since they all have a version 5
(WarnVersion) 4