That's right, so on my desktop the following very simple code crashes / crashes when compiling and running on the 3.5 framework
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Window.Resources>
<ResourceDictionary>
<Style x:Key="s1" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="10"></Setter>
</Style>
</ResourceDictionary>
</Window.Resources>
<Grid>
<TextBlock Text="adfasdf" Style="{StaticResource s1}"></TextBlock>
</Grid>
</Window>
The problem here, as far as I know, is FontSize in the style that applies to the control. When I delete it, that’s normal.
If I compile it in framework 4.0 on the same computer, it works.
It works on my laptop and, possibly, on all other machines, and not on my desktop.
Any help appreciated
source
share