No overload for 'OnStartup' matches delegate 'System.Windows.StartupEventHandler'

No overload for 'OnStartup' matches delegate 'System.Windows.StartupEventHandler'

今天wpf工程的App.xaml爆出这个问题, 明明cs理由事件处理函数OnStartUp,却无法编译。
原因是App.xaml声明的类名和App.xaml.cs中的类名不同。

修改一直, 并确认Event Hanlder存在。
原文地址:https://www.cnblogs.com/muzizongheng/p/3167508.html