Window owner = System.Windows.Application.Current.Windows.OfType<Window>().SingleOrDefault(x => x.IsActive);
if (owner == null)
owner = System.Windows.Application.Current.Windows.OfType<Window>().SingleOrDefault();
执行最后一行时,我收到的错误为:
System.Core.dll中出现未处理的“System.InvalidOperationException”类型异常
一旦我从VisualStudio 2012升级到VisualStudio 2015,就会出现此错误。
我必须采取哪些配置来解决此错误?