Trimming default WPF app breaks it
See original GitHub issuedotnet new wpf
dotnet publish -r win-x64 /p:PublishTrimmed=true
run the app
Running the app “does nothing” no window shows up.
Note that this is a regression from 3.1 where this worked.
Used: 5.0.100-rtm.20515.8
SDK
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Trimming options - .NET
Learn how to control trimming of self-contained apps. ... This setting enables trimming and will trim all assemblies by default.
Read more >Known trimming incompatibilities - .NET
Unfortunately, almost no WPF apps are runnable after trimming, so trimming support for WPF has been disabled in the .NET 6 SDK. Windows...
Read more >WPF: Trim all textboxes
I recently got a requirement that all the textboxes in my application should automatically trim the text when leaving the textbox. I can't/don't ......
Read more >NET 5.0 App Trimming and Potential for Future Progress
NET 5.0 app trimming to reduce the size of our deliverable; use both Visual Studio 2019 and the dotnet command to achieve app...
Read more >3 Ways to Deploy a WinForms or WPF .NET Core Application
Just set PublishTrimmed=true in your project. Typically, small tool-like console apps benefit the most as they tend to use fairly small subsets ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing as dup of https://github.com/dotnet/wpf/issues/3811
👍
Replacing this infrastructure is exactly why @rladuca and I pushed for the C# module-initializer feature (along with many others for many other good reasons). This should absolutely be changed in .NET 6. The ILASM/ILDASM trick is ok for now, but it’s meta-stable at best.
/cc @SamBent @ryalanms