VS2015通用APP - 无法加载汇编(badimageformatexception)

时间:2015-06-10 22:22:16

标签: win-universal-app badimageformatexception vs-2015-preview

在通用应用程序应用程序中调用已从nuguet导入的System.Threading,System.IO或System.ReflectionTypeExtensions的任何方法时出错,下面有一个例子:

致电:

private void Button_Click(object sender, RoutedEventArgs e)
{
    var thread = Thread.CurrentThread; 
}

错误:

Could not load file or assembly 'System.Threading.Thread, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
or one of its dependencies.
Reference assemblies should not be loaded for execution. 
They can only be loaded in the Reflection-only loader context. 
(Exception from HRESULT: 0x80131058) 

0 个答案:

没有答案