1

I recently created my first custom control. I attempted to add it in a separate project I have constructed.

I recieve this error: The type 'System.Windows.Controls.Control' is defined in an assembly that is not referenced. You must add a reference to assembly

Here are the steps I took to add the control.

  1. Add the Custom Control as a Reference in project
  2. Add the attribute xmlns:MyNamespace="clr-namespace:CustomControls;assembly=CustomControls" to the root element of the markup file where it is being used
  3. Rebuild the Controller and the project
dan_vitch
  • 4,477
  • 12
  • 46
  • 69

1 Answers1

1

You also need a reference to PresentationFramework.dll

Andrew Cooper
  • 32,176
  • 5
  • 81
  • 116