CsWinRT icon indicating copy to clipboard operation
CsWinRT copied to clipboard

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

Open jevansaks opened this issue 2 years ago • 0 comments

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 avatar Jan 11 '24 19:01 jevansaks