IssueRaiser

WPF is not trim-compatible

At the top-level, WPF apps should be able to use trimming with predictable results. To trim WPF safely, the trim warnings need to be fixed. A list of all warnings and a summary are provided here: WPF specific warnings can be seen in the file below, [usinglinkerwrn3.txt](https://github.com/dotnet/wpf/files/5660731/usinglinkerwrn3.txt) Warning information can be found [here](https://github.com/mono/linker/blob/master/docs/error-codes.md#warning-codes) at the mono site. [This ](https://github.com/dotnet/designs/blob/main/accepted/2020/linking-libraries.md#annotating-code) sections of the linking design document gives guidance for library developers on how to approach fixing warnings. The warnings grouping is as below Warnings | Count -- | -- IL2075 | 89 IL2070 | 59 IL2026 | 37 IL2072 | 25 IL2080 | 22 IL2094 | 11 IL2057 | 10 IL2067 | 8 IL2077 | 6 IL2060 | 5 IL2055 | 5 IL2090 | 4 IL2087 | 2 IL2065 | 1 IL2091 | 1 IL2058 | 1 IL2059 | 1 ## Goals - [ ] WPF template produces zero/minimal trim warnings - [ ] WPF APIs which are not linker-friendly are correctly annotated ## Progress ### Information gathering - [x] Generate list of warnings produced when linking a representative WPF app - [x] Categorize warnings, sorting to netcore warnings and WPF-specific warnings (see https://github.com/dotnet/runtime/issues/43078) - [x] Identify the cause of the warnings and propose fixes ### Code fixes - [ ] Fix warnings or annotate APIs as necessary - [ ] Identify linker-unsafe constru

Posted by agocke on Nov 13, 2020, 10:57 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments

github (SaaS)

WPF is not trim-compatible

agockeNov 13, 2020, 10:57 PM

At the top-level, WPF apps should be able to use trimming with predictable results. To trim WPF safely, the trim warnings need to be fixed. A list of all warnings and a summary are provided here: WPF specific warnings can be seen in the file below, [usinglinkerwrn3.txt](https://github.com/dotnet/wpf/files/5660731/usinglinkerwrn3.txt) Warning information can be found [here](https://github.com/mono/linker/blob/master/docs/error-codes.md#warning-codes) at the mono site. [This ](https://github.com/dotnet/designs/blob/main/accepted/2020/linking-libraries.md#annotating-code) sections of the linking design document gives guidance for library developers on how to approach fixing warnings. The warnings grouping is as below Warnings | Count -- | -- IL2075 | 89 IL2070 | 59 IL2026 | 37 IL2072 | 25 IL2080 | 22 IL2094 | 11 IL2057 | 10 IL2067 | 8 IL2077 | 6 IL2060 | 5 IL2055 | 5 IL2090 | 4 IL2087 | 2 IL2065 | 1 IL2091 | 1 IL2058 | 1 IL2059 | 1 ## Goals - [ ] WPF template produces zero/minimal trim warnings - [ ] WPF APIs which are not linker-friendly are correctly annotated ## Progress ### Information gathering - [x] Generate list of warnings produced when linking a representative WPF app - [x] Categorize warnings, sorting to netcore warnings and WPF-specific warnings (see https://github.com/dotnet/runtime/issues/43078) - [x] Identify the cause of the warnings and propose fixes ### Code fixes - [ ] Fix warnings or annotate APIs as necessary - [ ] Identify linker-unsafe constru

Comments (0)

No comments yet. Start the discussion.

Comment on this issue