Multiple WPF applications in the same AppDomain

前端 未结 3 995
时光取名叫无心
时光取名叫无心 2021-01-18 03:57

I got following setup:

WPF_Application.exe

and

a DLL that contains a WinForms Window and an WPF Window.

The \'WPF_Application.exe\' calls th

3条回答
  •  爱一瞬间的悲伤
    2021-01-18 04:08

    Make sure you only have one Application defined in XAML.

    Visual studio creates an App.xaml when making a new WPF solution, if you have created a new .xaml file with the tag, this will cause this error and the solution will build but fail at runtime.

    Delete the duplicate application and use Window or UserControl to have multiple windows.

提交回复
热议问题