locked
Error when trying to add a custom WPF UserControl in a WinForm RRS feed

  • Question

  • I have a fairly simple UserControl that I have created. When I try to add the UserControl to a WinForm I receive the following error message:

    "Type 'WindowsFormsIntegration.Design.HostedComponent' is not available in the target framework"

    The message is displayed when the control is added and shows several times when I attemp to do a Build on the WinForm project. The readme for .Net Framework Beta 1 mentions this as a known issue and offers the following for a workaround:

    "Add <vs install dir>\common7\ide\windowsformsintegration.Design.dll to project references and keep it referenced for as long as you have to use the WPF-WinForms interop designer."

    I have added this file to the WinForm project and even tried it on the UserControl project just to be thorough but the outcome is no different. Has anyone else run into this?
    Sunday, July 26, 2009 12:54 AM

All replies

  • Just installed 2010 beta and ran into the same issue, did you figure it out? I will keep on looking.
    Monday, August 3, 2009 9:54 PM
  • Restarting VS is necesary, it now works.
    Monday, August 3, 2009 10:01 PM