Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid BAML generated #9636

Closed
drolevar opened this issue Aug 23, 2024 · 2 comments
Closed

Invalid BAML generated #9636

drolevar opened this issue Aug 23, 2024 · 2 comments

Comments

@drolevar
Copy link

drolevar commented Aug 23, 2024

Description

When I build an app containing the following XAML with 9.0.0-preview.7, it's compiled into an unreadable BAML:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="DefaultAccessTextStyle" TargetType="{x:Type AccessText}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="FontSize" Value="14" />
        <Setter Property="Margin" Value="0" />
        <Setter Property="Focusable" Value="False" />
        <Setter Property="SnapsToDevicePixels" Value="True" />
        <Setter Property="OverridesDefaultStyle" Value="True" />
    </Style>

    <Style
        x:Key="{x:Type AccessText}"
        BasedOn="{StaticResource DefaultAccessTextStyle}"
        TargetType="{x:Type AccessText}" />

</ResourceDictionary>

image

Reproduction Steps

Build and run the attached project:

WpfApp1.zip

Expected behavior

Windows is shown:

image

Actual behavior

Exception is thrown:

image

Regression?

This has worked with NET 8.0.

Known Workarounds

No response

Impact

Cannot build with .NET 9.0.0-preview.7.

Configuration

No response

Other information

No response

@miloush
Copy link
Contributor

miloush commented Aug 23, 2024

Duplicate of #9582 (and #9620). Fixed in RC by #9584.

@drolevar
Copy link
Author

@miloush Ok. Closing issue.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants