2

I am building a visual Studio 2008 add-in. That Add-in needs a UI for user inputs. I was planning to use WPF for that UI. But i am not able to find a way to make that working. Is there any way to have a WPF form in Visual-studio add-in project?

Kate Gregory
  • 18,808
  • 8
  • 56
  • 85
rauts
  • 1,018
  • 9
  • 21
  • What is the problem that you are facing? How did you try to do it? – A9S6 Dec 07 '09 at 10:27
  • I added the reference to PresentationCore and PresentationFramework. Removed the Reference to Systems.Windows.forms so that Window class now belongs to WPF framework rather than the winforms. But once i trying to launch this WPF form,the Add-in crashes :( – rauts Dec 07 '09 at 10:39

1 Answers1

2

I think it crashes because WPF is MTA and Addins are STA. MTA vs STA more explanation available here...

Try with winforms to confirm this hypothesis.

Community
  • 1
  • 1
Cédric Guillemette
  • 2,394
  • 1
  • 14
  • 22
  • Does this mean that it is not possible to use WPF UIs in an Addin? And is that still the case in Visual Studio 2010? (and 2012?) – Nick Jul 06 '12 at 20:55