Extension method call does not compile, but static method call to same code does compile
There is library A calling library B using a C# extension method. I got a weird error from the C# compiler: The type 'System.Windows.Forms.Control' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Windows.Forms, Version=4.0.0.0 None of the libraries A or B are dependent on System.Windows.Forms.Control , nor has any dependency of A a dependency on System.Windows.Forms.Control . System.Windows.Forms.Control is only referenced from another project in the same solution. The weird thing is that if I change the call syntax to static method, it compiles