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

Authoring a class derived from AutomationPeer hits error CS1729: 'FrameworkElementAutomationPeer' does not contain a constructor that takes 0 arguments #1438

Open
jevansaks opened this issue Jan 11, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@jevansaks
Copy link
Member

Describe the bug
FrameworkElementAutomationPeer has only a 1-param constructor, but the generated code doesn't call it.

To Reproduce

    public sealed class TestAutomationPeer : FrameworkElementAutomationPeer
    {
        public TestAutomationPeer(FrameworkElement owner) : base(owner)
        {
        }
    }

Build this and you get:

1>WinRT.SourceGenerator\Generator.SourceGenerator\ManagedLibrary.cs(175,16,175,34): error CS1729: 'FrameworkElementAutomationPeer' does not contain a constructor that takes 0 arguments
@jevansaks jevansaks added the bug Something isn't working label Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant