System.Core.dll中发生了未处理的“System.InvalidOperationException”类型异常

时间:2016-10-07 06:23:42

标签: c# visual-studio-2015

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,就会出现此错误。

我必须采取哪些配置来解决此错误?

0 个答案:

没有答案