Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper wants me to implement an interface member that is implemented in WPF generated code

Tags:

c#

resharper

wpf

Simple class:

public partial class MainWindow
{
    public MainWindow()
    {
        this.InitializeComponent();
    }
}

class MainWindow is underlined red, resharper is complaining that IComponentConnector.Connect is not implemented. Checking the file obj\Debug\MainWindow.g.i.cs the method is there, and the compiler does not complain about anything.

What am I missing? Is this a bug in R#? I've got so many false solution errors at the moment - this count is useless.

Update

Problem persists even after:

  1. removing all _ReSharper files
  2. a fresh checkout from source control
like image 728
Marc Wittke Avatar asked Jul 24 '13 06:07

Marc Wittke


1 Answers

Remove System.Windows from your project references.

According to the docs IComponentConnector was moved from WindowsBase to System.Xaml. I think that System.Windows may also be involved, but it isn't documented.

like image 157
Ritch Melton Avatar answered Sep 16 '22 11:09

Ritch Melton