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
Create new WPF application (via CLI - dotnet new wpf).
Add Textblock element to MainWindow.xaml, so it contains <Grid> <TextBlock>Hello, world</TextBlock> </Grid>
Publish application with PublishTrimmed set to true (dotnet publish -c Release -r win-x64 -o C:\example /p:PublishTrimmed=true)
Application does not start and exception is logged in Event Log:
Application: example.exe
CoreCLR Version: 4.700.19.30373
.NET Core Version: 3.0.0-preview6-27804-01
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'System.Windows.Media.FontFamily' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MS.Internal.FontCache.DWriteFactory' threw an exception. ---> System.InvalidCastException: Specified cast is not valid.
Steps to reproduce:
<Grid> <TextBlock>Hello, world</TextBlock> </Grid>
Application does not start and exception is logged in Event Log:
Application: example.exe
CoreCLR Version: 4.700.19.30373
.NET Core Version: 3.0.0-preview6-27804-01
Description: The process was terminated due to an unhandled exception.
Exception Info: System.TypeInitializationException: The type initializer for 'System.Windows.Media.FontFamily' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MS.Internal.FontCache.DWriteFactory' threw an exception. ---> System.InvalidCastException: Specified cast is not valid.
(full exception list in attached file.)
error.txt
The text was updated successfully, but these errors were encountered: