VS2017 Constructor on type not found in WinForms Designer

Viewed 986

I am trying to create a form that inherits from a form. The base class is called Window, and it inherits from MetroForm, which is a NuGet package that I've downloaded and installed on the project. This form loads without issue in the Designer.

public partial class Window : MetroForm
{
    public WindowType windowType { get; }
    public Engine engine { get; }

    public Window(WindowType windowType, Engine engine)
    {
        InitializeComponent();
        this.windowType = windowType;
        this.engine = engine;
    }
}

The child form is declared and constructed as follows:

public partial class GraphicsWindow : Window
{
    public GraphicsWindow(WindowType windowType, Engine engine) : base(windowType, engine)
    {
        InitializeComponent();
    }
}

It throws the following error in the designer window:

"Constructor on type 'DispatcherDesk.Windows.Window' not found."

I've found multiple threads that address this error under the exact same circumstances, but none of the solutions are working for me. I've tried adding parameterless constructors to both the parent and child forms, adding InitializeComponent(); calls to them, and using the [Obsolete] attribute and private access modifier. I've also tried rebuilding the solution and restarting Visual Studio at each step.

All I can figure at this point is that these solutions no longer work in VS2017, but I don't know why. Thanks in advance for any answers!

0 Answers
Related